Обновлен запуск проекта

This commit is contained in:
2026-02-12 09:24:37 +08:00
parent d510efdaef
commit 43d93762c3
2 changed files with 10 additions and 5 deletions

13
dcr
View File

@@ -1,5 +1,10 @@
#!/bin/sh
#!/usr/bin/env bash
BASE_DIR="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
BASE_DIR="$(dirname "$(readlink -f "$0")")"
SRC_DIR="$BASE_DIR/src"
PYTHONPATH="$SRC_DIR" exec python3 -m dcr.main "$@"
if command -v python3 >/dev/null 2>&1; then
PYTHON_BIN="python3"
else
PYTHON_BIN="$BASE_DIR/Python/bin/python3"
fi
PYTHONPATH="$BASE_DIR/src" exec "$PYTHON_BIN" -m dcr.main "$@"

View File

@@ -86,7 +86,7 @@ install_wrapper() {
cat > "$INSTALL_PATH/dcr" <<'EOF'
#!/usr/bin/env bash
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
BASE_DIR="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
if command -v python3 >/dev/null 2>&1; then
PYTHON_BIN="python3"