diff --git a/2001/anonymous/.gitignore b/2001/anonymous/.gitignore index 49b1e5d70..3b07b9607 100644 --- a/2001/anonymous/.gitignore +++ b/2001/anonymous/.gitignore @@ -4,3 +4,4 @@ ten.bak.od ten.bak.txt ten.od ten.txt +anonymous_tmp diff --git a/2001/anonymous/Makefile b/2001/anonymous/Makefile index f870e5b07..69c986db9 100644 --- a/2001/anonymous/Makefile +++ b/2001/anonymous/Makefile @@ -139,7 +139,8 @@ ${PROG}: ${PROG}.c X='-DA(X)=#X'; \ warning='-Dprocessor'; \ $$magic $$warning -Dmagic= $$X "-DX=A($$magic \"$$X\")" \ - $< -o $@ ${LIBS} + $< -o $@_tmp ${LIBS} + ${CP} -af anonymous.sh $@ ${PROG}.ten: ${PROG}.ten.c diff --git a/2001/anonymous/anonymous.sh b/2001/anonymous/anonymous.sh new file mode 100755 index 000000000..230aa01e2 --- /dev/null +++ b/2001/anonymous/anonymous.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if [[ "$#" -lt 1 ]]; then + exit 1 +fi + +make >/dev/null 2>&1 + +if [[ -f "$1" ]]; then + ./anonymous_tmp "$1" + ./"$1" +fi +