Anthony/@SirWumpus kindly provided these files. The source code and their Makefiles are in a deobfuscated/ subdirectory (for each of the three entries) but running make alt from the entry directory works. It uses the deobfuscated version's Makefile but copies the compiled binary to the entry's directory to keep things clean (deobfuscated code separate from the entry) to simplify using the deobfuscated versions. Entries that had a test suite Makefile have a new one for the deobfuscated code and a try.alt.sh script was added to 1992/ant and 1993/ant but the entry_text is a bit different than the usual to indicate that it's the deobfuscated version. It might be that the way this is done should be reorganised some but that can be decided on later. The entries from 2004 and 2005 have not yet been added because some decisions have to be made as those are the ones with a configure script. The manifest was updated and the .entry.json and index.html files were updated. It is not clear yet if the inventory_order is right but that will be looked at in the next day or two. Thank you Anthony!
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# try.sh - demonstrate IOCCC entry 1993/ant alt 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" alt >/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: ./ant.alt ant.alt README.md: "
|
|
echo 1>&2
|
|
./ant.alt ant.alt README.md
|
|
echo 1>&2
|
|
|
|
read -r -n 1 -p "Press any key to run: ./ant.alt '\[' ant.txt: "
|
|
echo 1>&2
|
|
./ant.alt '\[' ant.txt
|
|
echo 1>&2
|
|
|
|
echo "Note: the next one should show: ag: Pattern too long." 1>&2
|
|
read -r -n 1 -p "Press any key to run: ./ant.alt '[' ant.txt: "
|
|
echo 1>&2
|
|
./ant.alt '[' ant.txt
|
|
echo 1>&2
|
|
|
|
read -r -n 1 -p "Press any key to run: ./ant.alt ant ants.txt | cut -d: -f2 (space = next page, q = quit): "
|
|
echo 1>&2
|
|
./ant.alt ant ants.txt | cut -d: -f2 | less -rEXF
|
|
echo 1>&2
|
|
|
|
read -r -n 1 -p "Press any key to run the test suite (make -f ant.alt.test.mk): "
|
|
echo 1>&2
|
|
make -f ant.alt.test.mk
|