-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·52 lines (43 loc) · 1.42 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·52 lines (43 loc) · 1.42 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
#!/bin/bash
set -e
SKILL_NAME="github-extractor"
SKILL_DIR="$HOME/.claude/skills/$SKILL_NAME"
REPO="professional-ALFIE/github-extractor"
BRANCH="master"
BASE_URL="https://raw.githubusercontent.com/$REPO/$BRANCH"
# ── Force clean install (always inject latest version) ──
if [ -d "$SKILL_DIR" ]; then
echo "Existing installation found. Replacing with latest version..."
rm -rf "$SKILL_DIR"
fi
echo "Installing $SKILL_NAME skill..."
mkdir -p "$SKILL_DIR/scripts"
# Core skill file
curl -sL "$BASE_URL/SKILL.md" -o "$SKILL_DIR/SKILL.md"
# Scripts
curl -sL "$BASE_URL/scripts/extractor_githubRawLinks.py" -o "$SKILL_DIR/scripts/extractor_githubRawLinks.py"
curl -sL "$BASE_URL/scripts/extractor_githubRawFiles.py" -o "$SKILL_DIR/scripts/extractor_githubRawFiles.py"
# Metadata
cat > "$SKILL_DIR/.skill-meta.json" << EOF
{
"source": "github",
"repo": "$REPO",
"isRootSkill": true,
"installedAt": "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)",
"updatedAt": "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)"
}
EOF
# Make scripts executable
chmod +x "$SKILL_DIR/scripts/"*
# Verify
if [ -f "$SKILL_DIR/SKILL.md" ] && [ -f "$SKILL_DIR/scripts/extractor_githubRawLinks.py" ]; then
echo ""
echo "✓ Installed to: $SKILL_DIR"
echo " Files:"
ls -1 "$SKILL_DIR" "$SKILL_DIR/scripts/" | sed 's/^/ /'
echo ""
echo "Done! Restart Claude Code to activate."
else
echo "✗ Installation failed. Check network and try again." >&2
exit 1
fi