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
commit672492caff469ea135d5e1338d4406d2b20bab16 (patch)
tree4ae61ce81e170c5208123d1b0a63bba20c6119f1 /tools/manage
parent90a72d2d7ed4a5eadfe36f62d81f26ca3324e49b (diff)
downloadcrupest-672492caff469ea135d5e1338d4406d2b20bab16.tar.gz
crupest-672492caff469ea135d5e1338d4406d2b20bab16.tar.bz2
crupest-672492caff469ea135d5e1338d4406d2b20bab16.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" "$@"