🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-12 22:44:30 -04:00
parent ae43147725
commit 2ce15a53c6
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F

View File

@ -122,7 +122,7 @@ fi
mkdir -p "/data/htdocs/www" && cd "/data/htdocs/www" || exit 10 mkdir -p "/data/htdocs/www" && cd "/data/htdocs/www" || exit 10
if [ -z "$1" ] && [ -z "$(ls -A "/data/htdocs/www"/* 2>/dev/null)" ]; then if [ -z "$1" ] && [ -z "$(ls -A "/data/htdocs/www"/* 2>/dev/null)" ]; then
cp -Rf "/usr/local/share/template-files/data/htdocs/www/." "/data/htdocs/www/" cp -Rf "/usr/local/share/template-files/data/htdocs/www/." "/data/htdocs/www/"
RUN_SCRIPT="src/index.ts" START_SCRIPT="src/index.ts"
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional commands # Additional commands
@ -155,8 +155,8 @@ deno)
*) # Execute primary command *) # Execute primary command
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
if [ -n "$RUN_SCRIPT" ]; then if [ -n "$START_SCRIPT" ]; then
START_SCRIPT="$RUN_SCRIPT" RUN_SCRIPT="$START_SCRIPT"
elif [ -f "src/index.ts" ]; then elif [ -f "src/index.ts" ]; then
RUN_SCRIPT="index.ts" RUN_SCRIPT="index.ts"
elif [ -f "index.ts" ]; then elif [ -f "index.ts" ]; then
@ -167,7 +167,7 @@ deno)
RUN_SCRIPT="server.ts" RUN_SCRIPT="server.ts"
fi fi
echo "Attempting to start deno" echo "Attempting to start deno"
deno --allow-all task start || deno run --watch --allow-all "${@:-}" || { echo "deno failed to start" && return 1; } deno task start || deno run --watch --allow-all ${@:-$RUN_SCRIPT} || { echo "deno failed to start" && return 1; }
exit ${exitCode:-$?} exit ${exitCode:-$?}
else else
__exec_command "$@" __exec_command "$@"