diff options
Diffstat (limited to 'services/manage')
-rwxr-xr-x | services/manage | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/services/manage b/services/manage index 4589475..c81e6dc 100755 --- a/services/manage +++ b/services/manage @@ -2,23 +2,16 @@ set -e -python3 --version >/dev/null 2>&1 || ( - echo Error: failed to run Python with python3 --version. +deno --version >/dev/null 2>&1 || ( + echo "Error: failed to run deno --version." + echo "If deno is not installed, install it with:" + echo " curl -fsSL https://deno.land/install.sh | sh" exit 1 ) -script_dir="$(dirname "$0")" - -# shellcheck disable=SC2046 -export $(xargs <"${script_dir:?}/base-config") - -CRUPEST_PROJECT_DIR="$(realpath "$script_dir/..")" +CRUPEST_PROJECT_DIR="$(realpath "$(dirname "$0")/..")" export CRUPEST_PROJECT_DIR -export PYTHONPATH="$CRUPEST_PROJECT_DIR/python:$PYTHONPATH" +echo "Project Dir: $CRUPEST_PROJECT_DIR" -if [[ "$#" != "0" ]] && [[ "$1" == "gen-tmpl" ]]; then - python3 -m cru.service template generate "${@:2}" -else - python3 -m cru.service "$@" -fi +exec deno run -A "$CRUPEST_PROJECT_DIR/deno/service-manager/main.ts" --project-dir "$CRUPEST_PROJECT_DIR" "$@" |