Replace script/update-policy with a short wget-and-commit script (closes #165) #181
@@ -33,7 +33,9 @@ PATH="$dir/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
# new_repo: a repo with one commit, holding only an older copy of the
|
||||
# script, so that a run must replace the script that is running.
|
||||
# script that is shorter than the new one. A run that rewrote the running
|
||||
# script in place, instead of replacing it, would then read the new
|
||||
# file's last lines as commands and fail.
|
||||
new_repo() {
|
||||
scenario="$1"
|
||||
rm -rf "$dir/repo"
|
||||
@@ -42,8 +44,8 @@ new_repo() {
|
||||
git config user.name test
|
||||
git config user.email test@example.com
|
||||
mkdir script
|
||||
cp "$PROMPTS/script/update-policy" script/
|
||||
echo "# older copy" >> script/update-policy
|
||||
grep -v '^# ' "$PROMPTS/script/update-policy" > script/update-policy
|
||||
chmod +x script/update-policy
|
||||
echo own > README.md
|
||||
git add README.md script/update-policy
|
||||
git commit -q -m initial
|
||||
|
||||
Reference in new issue
Block a user