fix: auth-rt auto-install 使用永久路径 ~/.local/share/auth-runtime
修复之前 clone 到 /tmp 后删除导致 wrapper 指向不存在路径的问题。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1884efa54e
commit
406b6d417c
11
install.sh
11
install.sh
|
|
@ -3,12 +3,15 @@ set -euo pipefail
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# Auto-install auth-rt if not found
|
# Auto-install auth-rt if not found
|
||||||
|
_AUTH_RT_SRC="$HOME/.local/share/auth-runtime"
|
||||||
if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.local/bin/auth-rt" ]; then
|
if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.local/bin/auth-rt" ]; then
|
||||||
echo "auth-rt not found, installing..."
|
echo "auth-rt not found, installing..."
|
||||||
_tmp="$(mktemp -d)"
|
if [ -d "$_AUTH_RT_SRC/.git" ]; then
|
||||||
git clone --depth 1 http://192.168.0.108:3030/agent-skills/auth-runtime.git "$_tmp/auth-runtime"
|
git -C "$_AUTH_RT_SRC" pull --ff-only
|
||||||
bash "$_tmp/auth-runtime/install.sh"
|
else
|
||||||
rm -rf "$_tmp"
|
git clone --depth 1 http://192.168.0.108:3030/agent-skills/auth-runtime.git "$_AUTH_RT_SRC"
|
||||||
|
fi
|
||||||
|
bash "$_AUTH_RT_SRC/install.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue