f1ed320991
Replace install/uninstall with add/remove, add publish for git ops in ~/.skills, and resolve bin/skiff symlinks so commands work from any cwd. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
456 B
Bash
Executable File
15 lines
456 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# 跟随软链,确保从 ~/.local/bin/skiff 调用时仍能找到仓库根目录
|
|
SCRIPT="${BASH_SOURCE[0]}"
|
|
while [ -L "$SCRIPT" ]; do
|
|
link_dir="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
|
SCRIPT="$(readlink "$SCRIPT")"
|
|
[[ "$SCRIPT" != /* ]] && SCRIPT="$link_dir/$SCRIPT"
|
|
done
|
|
REPO_ROOT="$(cd "$(dirname "$SCRIPT")/.." && pwd)"
|
|
|
|
export PYTHONPATH="${REPO_ROOT}${PYTHONPATH:+:$PYTHONPATH}"
|
|
exec python3 -m skiff "$@"
|