fix: dotup parses on macOS bash 3.2; stop applying bootstrap.sh
- dotup expand_deps(): bash 3.2 (macOS /bin/sh) cannot parse a case
pattern inside $( ... ) unless the pattern opens with "(", so the whole
script failed with a syntax error at line 107 before doing anything.
Both patterns now carry the leading paren, which POSIX allows and dash
and newer bash ignore. .tests/test.sh had the same construct (fzf
binding check) and gets the same fix.
- .chezmoiignore: bootstrap.sh is the curl-fetched installer, not a
dotfile; without the entry it landed as ~/bootstrap.sh.
Verified: /bin/sh -n and dash -n clean on every shell script in the repo;
on macOS, toggling agents/codex pulls in core/node and toggling
gpu/container-toolkit pulls in the docker group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FbsgpRAN9ukbXzWt2Zdwz
This commit is contained in:
1 parent
6be7896231
commit
2428c5ceb0
3 files changed
+7
-3
No files matched your search
@@ -11,6 +11,10 @@
|
||||
# Repo documentation, not a dotfile. Without this it lands as ~/README.md.
|
||||
README.md
|
||||
|
||||
# The bare-machine installer. It is fetched and run once by curl before
|
||||
# chezmoi exists; it is not a dotfile. Without this it lands as ~/bootstrap.sh.
|
||||
bootstrap.sh
|
||||
|
||||
# chezmoi's own config directory. Never manage the thing that configures the
|
||||
# manager.
|
||||
.config/chezmoi
|
||||
|
||||
+1
-1
@@ -373,7 +373,7 @@ p:gpu/nvidia-driver" "$hit"
|
||||
| sed "s|\$SELF|$D|g" \
|
||||
| while read -r b; do
|
||||
out=$(fzf --bind "$b" </dev/null 2>&1 || true)
|
||||
case $out in *nvalid*|*nknown*|*nsupported*) echo "$b" ;; esac
|
||||
case $out in (*nvalid*|*nknown*|*nsupported*) echo "$b" ;; esac
|
||||
done; :)
|
||||
is "every binding parses on fzf $(fzf --version | cut -d' ' -f1)" "" "$badbind"
|
||||
else
|
||||
|
||||
@@ -104,8 +104,8 @@ expand_deps() {
|
||||
done | tr ' ' '\n' | while read -r d; do
|
||||
[ -n "$d" ] || continue
|
||||
case $d in
|
||||
*/*) printf '%s\n' "$d" ;;
|
||||
*) awk -F'\t' -v g="$d" '!/^[#@]/ && NF>=3 && $1==g {print $1"/"$2}' "$MANIFEST" ;;
|
||||
(*/*) printf '%s\n' "$d" ;;
|
||||
(*) awk -F'\t' -v g="$d" '!/^[#@]/ && NF>=3 && $1==g {print $1"/"$2}' "$MANIFEST" ;;
|
||||
esac
|
||||
done)
|
||||
[ "${1:-}" != invasive-stop ] || add=$(printf '%s\n' "$add" | drop_invasive)
|
||||
|
||||
Reference in new issue
Block a user