Commit fd536be3 authored by whlwhlwhl's avatar whlwhlwhl
Browse files

修复安装错误

parent 60c75a2f
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
# KERNELPILOT_ROOT=/path/to/kernel-pilot ./install-lightop-skills-manual.sh # KERNELPILOT_ROOT=/path/to/kernel-pilot ./install-lightop-skills-manual.sh
# CLAUDE_SKILLS_DIR=/path/to/skills ./install-lightop-skills-manual.sh --target claude # CLAUDE_SKILLS_DIR=/path/to/skills ./install-lightop-skills-manual.sh --target claude
# CODEX_SKILLS_DIR=/path/to/skills ./install-lightop-skills-manual.sh --target codex # CODEX_SKILLS_DIR=/path/to/skills ./install-lightop-skills-manual.sh --target codex
# PIP_INSTALL_ARGS="--user --disable-pip-version-check" ./install-lightop-skills-manual.sh
# #
set -euo pipefail set -euo pipefail
...@@ -23,6 +24,9 @@ KERNELPILOT_ROOT="${KERNELPILOT_ROOT:-$SCRIPT_DIR}" ...@@ -23,6 +24,9 @@ KERNELPILOT_ROOT="${KERNELPILOT_ROOT:-$SCRIPT_DIR}"
TARGET="both" TARGET="both"
INSTALL_PIP="true" INSTALL_PIP="true"
DRY_RUN="false" DRY_RUN="false"
if [[ -z "${PIP_INSTALL_ARGS+x}" ]]; then
PIP_INSTALL_ARGS="--user --disable-pip-version-check"
fi
CLAUDE_SKILLS_DIR="${CLAUDE_SKILLS_DIR:-${HOME}/.claude/skills}" CLAUDE_SKILLS_DIR="${CLAUDE_SKILLS_DIR:-${HOME}/.claude/skills}"
CODEX_SKILLS_DIR="${CODEX_SKILLS_DIR:-${CODEX_HOME:-${HOME}/.codex}/skills}" CODEX_SKILLS_DIR="${CODEX_SKILLS_DIR:-${CODEX_HOME:-${HOME}/.codex}/skills}"
...@@ -62,6 +66,7 @@ Options: ...@@ -62,6 +66,7 @@ Options:
--codex-skills-dir PATH Codex skills dir (default: ${CODEX_HOME:-~/.codex}/skills) --codex-skills-dir PATH Codex skills dir (default: ${CODEX_HOME:-~/.codex}/skills)
--skip-pip Do not install knowledge/requirements.txt --skip-pip Do not install knowledge/requirements.txt
--dry-run Print actions without writing --dry-run Print actions without writing
PIP_INSTALL_ARGS Extra args for pip install (default: --user --disable-pip-version-check)
-h, --help Show this help -h, --help Show this help
EOF EOF
} }
...@@ -182,10 +187,12 @@ install_python_deps() { ...@@ -182,10 +187,12 @@ install_python_deps() {
fi fi
if [[ "$DRY_RUN" == "true" ]]; then if [[ "$DRY_RUN" == "true" ]]; then
log "DRY-RUN python3 -m pip install -r ${KNOWLEDGE_SRC}/requirements.txt" log "DRY-RUN python3 -m pip install ${PIP_INSTALL_ARGS} -r ${KNOWLEDGE_SRC}/requirements.txt"
else else
log "installing Python dependencies..." log "installing Python dependencies..."
python3 -m pip install -r "${KNOWLEDGE_SRC}/requirements.txt" # Default to user-site installation because skill installs usually run
# on shared machines where /usr/local is not writable.
python3 -m pip install ${PIP_INSTALL_ARGS} -r "${KNOWLEDGE_SRC}/requirements.txt"
fi fi
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment