badman99dev commited on
Commit
9a40833
·
verified ·
1 Parent(s): 390f254

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +33 -0
entrypoint.sh CHANGED
@@ -24,6 +24,7 @@ export PATH="$OP_PATH:$PATH"
24
  echo '=== [STEP 0] CLEANING BUCKET (Removing .cache and .npm) ==='
25
  hf buckets rm "$BUCKET/.cache" --recursive -y 2>/dev/null && echo '=== [STEP 0] .cache removed from bucket ===' || echo '=== [STEP 0] .cache not found in bucket (skipping) ==='
26
  hf buckets rm "$BUCKET/.npm" --recursive -y 2>/dev/null && echo '=== [STEP 0] .npm removed from bucket ===' || echo '=== [STEP 0] .npm not found in bucket (skipping) ==='
 
27
  echo '=== [STEP 0] BUCKET CLEANUP DONE ==='
28
 
29
  # ============================================
@@ -42,6 +43,38 @@ if [ ! -d "/home/user" ]; then
42
  mkdir -p /home/user
43
  fi
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  # ============================================
46
  # STEP 2: START OPENCODE (with RAM watchdog)
47
  # ============================================
 
24
  echo '=== [STEP 0] CLEANING BUCKET (Removing .cache and .npm) ==='
25
  hf buckets rm "$BUCKET/.cache" --recursive -y 2>/dev/null && echo '=== [STEP 0] .cache removed from bucket ===' || echo '=== [STEP 0] .cache not found in bucket (skipping) ==='
26
  hf buckets rm "$BUCKET/.npm" --recursive -y 2>/dev/null && echo '=== [STEP 0] .npm removed from bucket ===' || echo '=== [STEP 0] .npm not found in bucket (skipping) ==='
27
+ hf buckets rm "$BUCKET/.nvm" --recursive -y 2>/dev/null && echo '=== [STEP 0] .nvm removed from bucket ===' || echo '=== [STEP 0] .nvm not found in bucket (skipping) ==='
28
  echo '=== [STEP 0] BUCKET CLEANUP DONE ==='
29
 
30
  # ============================================
 
43
  mkdir -p /home/user
44
  fi
45
 
46
+ # ============================================
47
+ # SKILLS SYNC: Import missing skills from GitHub
48
+ # ============================================
49
+ echo '=== [SKILLS] Syncing OpenCode skills from GitHub ==='
50
+
51
+ SKILLS_REPO='https://github.com/badman99dev/Opencode-config'
52
+ LOCAL_SKILLS="$HOME/.config/opencode/skills"
53
+ SKILLS_TEMP=$(mktemp -d)
54
+
55
+ mkdir -p "$LOCAL_SKILLS"
56
+
57
+ if git clone --depth=1 "$SKILLS_REPO" "$SKILLS_TEMP" 2>/dev/null; then
58
+ if [ -d "$SKILLS_TEMP/skills" ]; then
59
+ for item in "$SKILLS_TEMP/skills"/*; do
60
+ item_name=$(basename "$item")
61
+ if [ ! -e "$LOCAL_SKILLS/$item_name" ]; then
62
+ cp -r "$item" "$LOCAL_SKILLS/"
63
+ echo "=== [SKILLS] Added: $item_name ==="
64
+ else
65
+ echo "=== [SKILLS] Already exists, skipping: $item_name ==="
66
+ fi
67
+ done
68
+ echo '=== [SKILLS] Sync complete ==='
69
+ else
70
+ echo '=== [SKILLS] No skills/ folder found in repo (skipping) ==='
71
+ fi
72
+ else
73
+ echo '=== [SKILLS] Git clone failed (skipping skills sync) ==='
74
+ fi
75
+
76
+ rm -rf "$SKILLS_TEMP"
77
+
78
  # ============================================
79
  # STEP 2: START OPENCODE (with RAM watchdog)
80
  # ============================================