By convention, and in scripts-to-rule-them-all, script/install installs the program itself. This script fetches the shared policy files into a repo. The make target, the test names and the messages take the new name. Behaviour is unchanged. Model: opus-5-5
This commit is contained in:
1 parent
ff42f4013d
commit
917fe4bc1d
9 files changed
+113
-111
No files matched your search
@@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
# script/install: write the current policy files from the prompts repo
|
||||
# into a repo clone, over HTTP. It commits nothing; script/update-policy
|
||||
# does that. Identical in all repos. Our own extension to
|
||||
# scripts-to-rule-them-all.
|
||||
# script/fetch-policy: write the current policy files from the prompts
|
||||
# repo into a repo clone, over HTTP. It commits nothing;
|
||||
# script/update-policy does that. Identical in all repos. Our own
|
||||
# extension to scripts-to-rule-them-all.
|
||||
#
|
||||
# Usage: script/install [path of a repo clone]
|
||||
# Usage: script/fetch-policy [path of a repo clone]
|
||||
# Without a path it updates the repo this script sits in.
|
||||
#
|
||||
# Standard output is the full hash of the prompts commit, then each path
|
||||
@@ -50,12 +50,12 @@ prompts/GO_HTTP_SERVER_CONVENTIONS.md
|
||||
prompts/LLM_PROSE_TELLS.md
|
||||
prompts/NEW_REPO_CHECKLIST.md
|
||||
prompts/REPO_POLICIES.md
|
||||
script/install
|
||||
script/fetch-policy
|
||||
script/update-policy
|
||||
"
|
||||
|
||||
die() {
|
||||
echo "install: $*" >&2
|
||||
echo "fetch-policy: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ $own"
|
||||
}
|
||||
|
||||
main() {
|
||||
[ "$#" -le 1 ] || die "usage: script/install [path of a repo clone]"
|
||||
[ "$#" -le 1 ] || die "usage: script/fetch-policy [path of a repo clone]"
|
||||
|
||||
target="${1:-$(dirname "$0")/..}"
|
||||
cd "$target" || die "no such directory: $target"
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
# script/update-policy: bring this repo up to standards. It fetches the
|
||||
# current script/install from the prompts repo over HTTP, runs it on this
|
||||
# repo and commits the files it wrote. It does not push. Identical in all
|
||||
# repos. Our own extension to scripts-to-rule-them-all.
|
||||
# current script/fetch-policy from the prompts repo over HTTP, runs it
|
||||
# on this repo and commits the files it wrote. It does not push.
|
||||
# Identical in all repos. Our own extension to scripts-to-rule-them-all.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
INSTALL_URL="https://git.eeqj.de/sneak/prompts/raw/branch/main/script/install"
|
||||
FETCH_POLICY_URL="https://git.eeqj.de/sneak/prompts/raw/branch/main/script/fetch-policy"
|
||||
|
||||
die() {
|
||||
echo "update-policy: $*" >&2
|
||||
@@ -22,10 +22,10 @@ main() {
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
curl --fail --silent --show-error --max-time 60 \
|
||||
--output "$tmp/install" "$INSTALL_URL" ||
|
||||
die "cannot fetch $INSTALL_URL"
|
||||
--output "$tmp/fetch-policy" "$FETCH_POLICY_URL" ||
|
||||
die "cannot fetch $FETCH_POLICY_URL"
|
||||
|
||||
sh "$tmp/install" "$ROOT" > "$tmp/written"
|
||||
sh "$tmp/fetch-policy" "$ROOT" > "$tmp/written"
|
||||
commit="$(head -n 1 "$tmp/written")"
|
||||
paths="$(tail -n +2 "$tmp/written")"
|
||||
|
||||
|
||||
Reference in new issue
Block a user