v6: boot-refresh start_comfy + claude_start.sh; chmod exec by shebang
Browse files
docker/refresh-workspace.sh
CHANGED
|
@@ -32,7 +32,9 @@ update_workspace_file() {
|
|
| 32 |
if curl -fsSL --connect-timeout 10 --max-time 60 "${auth[@]}" "$url" -o "$tmp" \
|
| 33 |
&& head -c 2 "$tmp" | grep -q "$check"; then
|
| 34 |
if ! cmp -s "$tmp" "$dest" 2>/dev/null; then
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
mv "$tmp" "$dest"
|
| 37 |
echo "$TAG updated $name from hf.co/$REPO_ID."
|
| 38 |
fi
|
|
@@ -43,6 +45,8 @@ update_workspace_file() {
|
|
| 43 |
}
|
| 44 |
update_workspace_file download_missing_models.sh '#!' || true
|
| 45 |
update_workspace_file README.md '.' || true
|
|
|
|
|
|
|
| 46 |
|
| 47 |
# 2) mirror workflows/ from the repo (temp snapshot + rsync --delete, so
|
| 48 |
# renamed/removed workflows disappear too; local-only edits do NOT survive —
|
|
|
|
| 32 |
if curl -fsSL --connect-timeout 10 --max-time 60 "${auth[@]}" "$url" -o "$tmp" \
|
| 33 |
&& head -c 2 "$tmp" | grep -q "$check"; then
|
| 34 |
if ! cmp -s "$tmp" "$dest" 2>/dev/null; then
|
| 35 |
+
# scripts (shebang in first bytes) must stay executable, even
|
| 36 |
+
# without a .sh suffix (e.g. start_comfy); everything else 644
|
| 37 |
+
if head -c2 "$tmp" | grep -q '#!'; then chmod 755 "$tmp"; else chmod 644 "$tmp"; fi
|
| 38 |
mv "$tmp" "$dest"
|
| 39 |
echo "$TAG updated $name from hf.co/$REPO_ID."
|
| 40 |
fi
|
|
|
|
| 45 |
}
|
| 46 |
update_workspace_file download_missing_models.sh '#!' || true
|
| 47 |
update_workspace_file README.md '.' || true
|
| 48 |
+
update_workspace_file start_comfy '#!' || true
|
| 49 |
+
update_workspace_file claude_start.sh '#!' || true
|
| 50 |
|
| 51 |
# 2) mirror workflows/ from the repo (temp snapshot + rsync --delete, so
|
| 52 |
# renamed/removed workflows disappear too; local-only edits do NOT survive —
|