2021-09-05 20:27:05 +00:00
|
|
|
#!/bin/sh
|
2021-09-05 21:52:23 +00:00
|
|
|
# Simplified run tool for deno commands
|
2021-09-05 20:27:05 +00:00
|
|
|
|
2021-09-05 21:52:23 +00:00
|
|
|
if test $# -eq 0
|
|
|
|
then
|
|
|
|
echo "Usage: $0 [file or command]"
|
|
|
|
exit 1
|
|
|
|
elif echo $1 | grep -q '.*.ts'
|
|
|
|
then
|
|
|
|
denocmd=run
|
|
|
|
denoargs=$1
|
|
|
|
shift
|
|
|
|
else
|
|
|
|
denocmd=$1
|
|
|
|
shift
|
|
|
|
fi
|
2021-09-05 20:27:05 +00:00
|
|
|
|
2021-09-05 21:52:23 +00:00
|
|
|
denoargs="$(cat config/$denocmd.flags 2> /dev/null) $denoargs $@"
|
|
|
|
exec deno $denocmd $denoargs
|