-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·79 lines (68 loc) · 2.3 KB
/
install.sh
File metadata and controls
executable file
·79 lines (68 loc) · 2.3 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_NAME="aleo-leo"
GLOBAL=false
FORCE=false
YES=false
usage() {
echo "Usage: $0 [--global|-g] [--force|-f] [--yes|-y]"
echo ""
echo "Install aleo-skills for Claude Code."
echo ""
echo " --global, -g Install to ~/.claude/skills/ (all projects)"
echo " --local Install to ./.claude/skills/ (current project, default)"
echo " --force, -f Overwrite existing installation"
echo " --yes, -y Skip confirmation prompt"
exit 0
}
while [[ $# -gt 0 ]]; do
case $1 in
--global|-g) GLOBAL=true; shift ;;
--local) GLOBAL=false; shift ;;
--force|-f) FORCE=true; shift ;;
--yes|-y) YES=true; shift ;;
--help|-h) usage ;;
*) echo "Unknown option: $1"; usage ;;
esac
done
if [ "$GLOBAL" = true ]; then
SKILLS_DIR="$HOME/.claude/skills"
else
SKILLS_DIR="$(pwd)/.claude/skills"
fi
DEST="$SKILLS_DIR/$SKILL_NAME"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Aleo Skills Installer"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Skill: $SKILL_NAME"
echo "Target: $DEST"
if [ "$GLOBAL" = true ]; then
echo "Scope: Global (all projects)"
else
echo "Scope: Local (current directory)"
fi
echo ""
if [ -d "$DEST" ] && [ "$FORCE" != true ]; then
echo "ERROR: $DEST already exists. Use --force to overwrite."
exit 1
fi
if [ "$YES" != true ]; then
read -p "Proceed? (y/n): " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Cancelled."
exit 0
fi
fi
[ -d "$DEST" ] && rm -rf "$DEST"
mkdir -p "$DEST"
cp "$SCRIPT_DIR/SKILL.md" "$DEST/SKILL.md"
if [ -d "$SCRIPT_DIR/references" ]; then
cp -r "$SCRIPT_DIR/references" "$DEST/references"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Installed $SKILL_NAME to $DEST"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"