aboutsummaryrefslogtreecommitdiff
path: root/tools/manage
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-11-11 01:12:29 +0800
committerYuqian Yang <crupest@crupest.life>2025-01-20 23:41:34 +0800
commit8f4ce33d5d55401102d6ebb6d4d0d8b9136ee1ca (patch)
tree4ae61ce81e170c5208123d1b0a63bba20c6119f1 /tools/manage
parenta293e50247ff6e61cd730b6ef02c287d9264f17b (diff)
downloadcrupest-8f4ce33d5d55401102d6ebb6d4d0d8b9136ee1ca.tar.gz
crupest-8f4ce33d5d55401102d6ebb6d4d0d8b9136ee1ca.tar.bz2
crupest-8f4ce33d5d55401102d6ebb6d4d0d8b9136ee1ca.zip
HALF WORK: 2024.1.20 - 5
Diffstat (limited to 'tools/manage')
-rw-r--r--tools/manage16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/manage b/tools/manage
new file mode 100644
index 0000000..39eb16a
--- /dev/null
+++ b/tools/manage
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -e
+
+python3.11 --version >NUL 2>&1 || (
+ echo Error: failed to run Python with py -3 --version.
+ exit 1
+)
+
+script_dir=$(dirname "$0")
+project_dir=$(realpath "$script_dir/..")
+
+cd "$project_dir"
+
+export PYTHONPATH="$project_dir/tools/cru-py:$PYTHONPATH"
+python3.11 -m cru.service --project-dir "$project_dir" "$@"