This was done by:
sgit -e 's/alt code/alternate code/g' . ; git co tmp/OLD_manifest
as well as updating the tmp/manifest.numbers spreadsheet and exporting
to the CSV file (though that would not strictly be necessary).
The way this works means that the update manifest script does not need
to be run as it sgit(1) touched the .entry.json files (any that needed
to be updated) and so would any index.html files. An example for both
.entry.json and index.html files being modified due to manifest is
2012/kang.
Numerous Makefiles were updated, any try scripts that had 'alt code'
instead of 'alternate code' and README.md/index.html files (unrelated to
the manifest as 'alt code' was used in other places too) and obviously
the manifest.numbers spreadsheet.
However to be safe I will do a run of the manifest script in a bit even
though it should not be necessary. If no commits are made it means all
is good and if any commits are made for the manifest it means that I
did not think of something (or else I made another change after this).
64 lines
2.0 KiB
Bash
Executable File
64 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# try.alt.sh - demonstrate IOCCC entry 2018/ferguson alternate code
|
|
#
|
|
|
|
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
|
# this way allows us to have the user specify a different compiler in an easy
|
|
# way.
|
|
if [[ -z "$CC" ]]; then
|
|
CC="cc"
|
|
fi
|
|
|
|
make CC="$CC" everything >/dev/null || exit 1
|
|
|
|
# clear screen after compilation so that only the entry is shown
|
|
clear
|
|
|
|
read -r -n 1 -p "Press any key to run: ./weasel.alt words (space = next page, q = quit, G = end): "
|
|
echo 1>&2
|
|
time ./weasel.alt words | less -rEXFK
|
|
|
|
read -r -n 1 -p "Press any key to see how long it'll take Eric the monkey to type his name: "
|
|
echo 1>&2
|
|
time ./weasel.alt -mq Eric
|
|
echo 1>&2
|
|
|
|
read -r -p "Do you want to run make test (Y/N)? "
|
|
if [[ "$REPLY" = "Y" || "$REPLY" = "y" ]]; then
|
|
make test
|
|
fi
|
|
|
|
read -r -p "Do you wish to see the undocumented Easter egg (Y/N)? "
|
|
if [[ "$REPLY" = "Y" || "$REPLY" = "y" ]]; then
|
|
make -B OFFSPRING=97 everything 1>/dev/null || exit 1
|
|
read -r -n 1 -p "Press any key to show Easter egg (./weasel.alt): "
|
|
echo 1>&2
|
|
./weasel.alt
|
|
echo 1>&2
|
|
fi
|
|
|
|
echo 1>&2
|
|
read -r -n 1 -p "Press any key to change max attempts to 100: "
|
|
echo 1>&2
|
|
echo "$ make -B MAX_ATTEMPTS=100 everything >/dev/null || exit 1" 1>&2
|
|
echo 1>&2
|
|
make -B MAX_ATTEMPTS=100 everything >/dev/null || exit 1
|
|
read -r -n 1 -p "Press any key to see what happens when the maximum attempts are reached: "
|
|
echo 1>&2
|
|
./weasel.alt -m 'Eric the Monkey'
|
|
|
|
# recompile with default max attempts for the next steps
|
|
make -B everything >/dev/null || exit 1
|
|
|
|
# obviously '"intelligent" design' is false but who wants to try and prove
|
|
# otherwise? Or if they know better how long will it take to show that evolution
|
|
# is a proven fact?
|
|
./id.alt.sh
|
|
|
|
# If the user did not try and prove '"intelligent" design' or they waited a
|
|
# long time (though saving them some time by limiting it to 900000 attempts) I
|
|
# ask: can Eric the monkey type the word 'words' before falling asleep or
|
|
# getting too hungry to continue?
|
|
./monkey-words.alt.sh
|