-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·54 lines (46 loc) · 1.2 KB
/
deploy.sh
File metadata and controls
executable file
·54 lines (46 loc) · 1.2 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
#!/bin/bash
# Deploy walnut plugin from local clone to cache + marketplace
# Usage: ./deploy.sh [--dry-run]
set -euo pipefail
SOURCE="$(cd "$(dirname "$0")/plugins/walnut" && pwd)"
CACHE="$HOME/.claude/plugins/cache/stackwalnuts/walnut/1.0.0"
MARKETPLACE="$HOME/.claude/plugins/marketplaces/stackwalnuts/plugins/walnut"
if [ ! -d "$SOURCE" ]; then
echo "ERROR: Source not found at $SOURCE"
exit 1
fi
DRY_RUN=""
if [ "${1:-}" = "--dry-run" ]; then
DRY_RUN="--dry-run"
echo "=== DRY RUN ==="
fi
echo "Source: $SOURCE"
echo "Cache: $CACHE"
echo "Marketplace: $MARKETPLACE"
echo ""
# Deploy to cache (if it exists)
if [ -d "$CACHE" ]; then
rsync -av --delete \
--exclude='.git' \
--exclude='.DS_Store' \
$DRY_RUN \
"$SOURCE/" "$CACHE/"
echo ""
echo "Cache deployed."
else
echo "Cache dir not found at $CACHE — skipping."
fi
# Deploy to marketplace (if it exists)
if [ -d "$MARKETPLACE" ]; then
rsync -av --delete \
--exclude='.git' \
--exclude='.DS_Store' \
$DRY_RUN \
"$SOURCE/" "$MARKETPLACE/"
echo ""
echo "Marketplace deployed."
else
echo "Marketplace dir not found at $MARKETPLACE — skipping."
fi
echo ""
echo "Done $(date '+%Y-%m-%d %H:%M:%S')"