-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
53 lines (45 loc) · 1.4 KB
/
Copy pathinstall.sh
File metadata and controls
53 lines (45 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# Install script for Ekosistem Edho Ferdian (EEF) — copies skills/*/ into
# ~/.claude/skills/. Run from a cloned copy of this repo.
#
# Usage:
# ./install.sh # install all 33 skills
# ./install.sh code-review-edho-ferdian dev-kickoff-edho-ferdian
# # install only the named skills
# ./install.sh --list # list installable skill names and exit
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILLS_SRC="$SCRIPT_DIR/skills"
TARGET_DIR="${CLAUDE_SKILLS_DIR:-$HOME/.claude/skills}"
if [ ! -d "$SKILLS_SRC" ]; then
echo "Error: $SKILLS_SRC not found. Run this script from the repo root." >&2
exit 1
fi
if [ "${1:-}" = "--list" ]; then
find "$SKILLS_SRC" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort
exit 0
fi
mkdir -p "$TARGET_DIR"
if [ "$#" -gt 0 ]; then
names=("$@")
else
names=()
while IFS= read -r name; do
names+=("$name")
done < <(find "$SKILLS_SRC" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort)
fi
installed=0
for name in "${names[@]}"; do
src="$SKILLS_SRC/$name"
if [ ! -d "$src" ]; then
echo "Skip: no such skill '$name'" >&2
continue
fi
dest="$TARGET_DIR/$name"
rm -rf "$dest"
cp -r "$src" "$dest"
echo "Installed: $name -> $dest"
installed=$((installed + 1))
done
echo ""
echo "Done. $installed skill(s) installed to $TARGET_DIR"