Replace script/update-policy with a short wget-and-commit script (closes #165) #181

Merged
clawbot merged 5 commits from issue-165-simple-update-policy into next 2026-11-18 23:23:50 +01:00
Showing only changes of commit 29496c2586 - Show all commits
+3 -2
View File
@@ -1,7 +1,8 @@
#!/bin/sh
# test/update-policy.sh: test script/update-policy on throwaway repos. A
# stub wget serves the files from this checkout, or fails for the path
# in WGET_FAIL, so nothing touches the network.
# in WGET_FAIL, so nothing touches the network. Like wget, it writes a
# new file without the execute bit, whatever the source's mode.
set -eu
PROMPTS="$(cd "$(dirname "$0")/.." && pwd -P)"
@@ -25,7 +26,7 @@ while [ "\$#" -gt 1 ]; do
done
path="\${1#https://git.eeqj.de/sneak/prompts/raw/branch/main/}"
[ "\$path" != "\${WGET_FAIL:-}" ] || exit 1
cp "$PROMPTS/\$path" "\$output"
cat "$PROMPTS/\$path" > "\$output"
EOF
chmod +x "$dir/bin/wget"
PATH="$dir/bin:$PATH"