Merge pull request #1414 from xexyl/try-sh-cc
This commit is contained in:
24 files changed
+341
-31
No files matched your search
+16
-1
@@ -1,6 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - show IOCCC winner 1995/dodsond1
|
||||||
|
#
|
||||||
|
|
||||||
make all >/dev/null || exit 1
|
# get CC
|
||||||
|
|
||||||
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ cat try.this.txt"
|
echo "$ cat try.this.txt"
|
||||||
cat try.this.txt
|
cat try.this.txt
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - show IOCCC winner 1995/esde
|
||||||
|
#
|
||||||
|
|
||||||
make all >/dev/null || exit 1
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ ./esde esde.data Johanson"
|
echo "$ ./esde esde.data Johanson"
|
||||||
./esde esde.data Johanson
|
./esde esde.data Johanson
|
||||||
|
|||||||
+20
-1
@@ -1,6 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - show IOCCC winner 1996/august
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
make clobber all
|
|
||||||
set -x
|
set -x
|
||||||
cat august.c test.oc | ./august > test.oo
|
cat august.c test.oc | ./august > test.oo
|
||||||
./august < test.oo
|
./august < test.oo
|
||||||
@@ -14,7 +28,12 @@ cat parse.oo fac.oc | ./august | ./august
|
|||||||
|
|
||||||
rm august.oc
|
rm august.oc
|
||||||
make august.oc
|
make august.oc
|
||||||
|
|
||||||
|
# this next step is vital for some compilers! Not having it will make the
|
||||||
|
# compiler create code that enters an infinite loop. This is known to happen in
|
||||||
|
# macOS as one example.
|
||||||
sed -i'' '/^#/d' august.oc
|
sed -i'' '/^#/d' august.oc
|
||||||
|
|
||||||
cat august.c august.oc | ./august > august.oo
|
cat august.c august.oc | ./august > august.oo
|
||||||
cat august.oo test.oo | ./august
|
cat august.oo test.oo | ./august
|
||||||
cat august.oo august.oo fac.oo | ./august
|
cat august.oo august.oo fac.oo | ./august
|
||||||
|
|||||||
+17
-1
@@ -1,6 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - show IOCCC winner 1996/gandalf
|
||||||
|
#
|
||||||
|
# BTW: it is absolutely perilous to 'try' the patience of Gandalf: go ahead,
|
||||||
|
# 'try it'! :-)
|
||||||
|
#
|
||||||
|
|
||||||
make all 1>/dev/null || exit 1
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
# remove temporary files to show later
|
# remove temporary files to show later
|
||||||
rm -f hatcat.txt cathat.txt hatcat2.txt cathat2.txt hatcat3.txt cathat3.txt
|
rm -f hatcat.txt cathat.txt hatcat2.txt cathat2.txt hatcat3.txt cathat3.txt
|
||||||
|
|||||||
+13
-1
@@ -1,7 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - show IOCCC winner 1996/schweikh2
|
||||||
|
#
|
||||||
|
|
||||||
make all >/dev/null || exit 1
|
# 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" all >/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 to run ./schweikh2: " 1>&2
|
read -r -n 1 -p "Press any key to to run ./schweikh2: " 1>&2
|
||||||
./schweikh2
|
./schweikh2
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.alt.sh - demonstrate IOCCC winner 1996/westley alt code
|
||||||
|
#
|
||||||
|
|
||||||
make everything 1>/dev/null || exit 1
|
# 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
|
||||||
|
|
||||||
echo "Showing alt grandfather clock:" 1>&2
|
echo "Showing alt grandfather clock:" 1>&2
|
||||||
WESTLEY=./westley.alt ./clock1.sh
|
WESTLEY=./westley.alt ./clock1.sh
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 1996/westley
|
||||||
|
#
|
||||||
|
|
||||||
make everything 1>/dev/null || exit 1
|
# 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
|
||||||
|
|
||||||
echo "Showing grandfather clock:" 1>&2
|
echo "Showing grandfather clock:" 1>&2
|
||||||
WESTLEY=./westley ./clock1.sh
|
WESTLEY=./westley ./clock1.sh
|
||||||
|
|||||||
+12
-6
@@ -1,13 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# try.sh - demonstrate 1998/bas2
|
# try.sh - demonstrate IOCCC winner 1998/bas2
|
||||||
#
|
|
||||||
# If any args are specified it checks if it's a readable file and if it is it
|
|
||||||
# feeds it to the program. If not it assumes it's a string and feeds that to the
|
|
||||||
# program.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
make all || exit 1
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ ./bas2 < bas2.c" 1>&2
|
echo "$ ./bas2 < bas2.c" 1>&2
|
||||||
./bas2 < bas2.c
|
./bas2 < bas2.c
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# script to show 1998/dorssel
|
# try.sh - demonstrate IOCCC winner 1998/dorssel
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ echo 'Simple as 123' | ./dorssel" 1>&2
|
echo "$ echo 'Simple as 123' | ./dorssel" 1>&2
|
||||||
echo 'Simple as 123' | ./dorssel
|
echo 'Simple as 123' | ./dorssel
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 1998/fanf
|
||||||
|
#
|
||||||
|
|
||||||
make all || exit 1
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ echo '((\a(\b(\c(d)))) e' | ./fanf" 1>&2
|
echo "$ echo '((\a(\b(\c(d)))) e' | ./fanf" 1>&2
|
||||||
echo '((\a(\b(\c(d)))) e)' | ./fanf
|
echo '((\a(\b(\c(d)))) e)' | ./fanf
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 1998/schnitzi
|
||||||
|
#
|
||||||
|
|
||||||
make all || exit 1
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ ./schnitzi 3 > sort.c" 1>&2
|
echo "$ ./schnitzi 3 > sort.c" 1>&2
|
||||||
./schnitzi 3 > sort.c
|
./schnitzi 3 > sort.c
|
||||||
|
|||||||
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 1998/schweikh3
|
||||||
|
#
|
||||||
|
|
||||||
make all || exit 1
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
echo "$ cp -f schweikh3 file1"
|
echo "$ cp -f schweikh3 file1"
|
||||||
cp -f schweikh3 file1
|
cp -f schweikh3 file1
|
||||||
|
|||||||
+13
-1
@@ -1,8 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# script to demonstrate 1998/tomtorfs
|
# try.sh - demonstrate IOCCC winner 1998/tomtorfs
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
rm -f file.A file.B file.C
|
rm -f file.A file.B file.C
|
||||||
|
|
||||||
echo "$ echo abscond conferrable > file.A" 1>&2
|
echo "$ echo abscond conferrable > file.A" 1>&2
|
||||||
|
|||||||
+15
-2
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# try.sh - script to show 2000/tomx
|
# try.alt.sh - demonstrate IOCCC winner 2000/tomx 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
|
||||||
|
|
||||||
echo "Using tomx.alt.c to compile mkentry.c directly:" 1>&2
|
echo "Using tomx.alt.c to compile mkentry.c directly:" 1>&2
|
||||||
echo "$ chmod +x tomx.alt.c" 1>&2
|
echo "$ chmod +x tomx.alt.c" 1>&2
|
||||||
|
|||||||
+15
-2
@@ -1,6 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# try.sh - script to show 2000/tomx
|
# try.sh - demonstrate IOCCC winner 2000/tomx
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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" all >/dev/null || exit 1
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
if [[ ! -f "tomx" || ! -e "tomx" ]]; then
|
if [[ ! -f "tomx" || ! -e "tomx" ]]; then
|
||||||
echo "Compiling tomx.c:" 1>&2
|
echo "Compiling tomx.c:" 1>&2
|
||||||
|
|||||||
+16
-1
@@ -1,7 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 2001/anonymous
|
||||||
|
#
|
||||||
|
|
||||||
make clobber alt all >/dev/null 2>&1
|
# 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
|
||||||
|
|
||||||
|
# in this case we won't fail if we can't compile the code because we can still
|
||||||
|
# run the supplementary program.
|
||||||
|
make CC="$CC" everything >/dev/null
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
TARGET="anonymous.ten"
|
TARGET="anonymous.ten"
|
||||||
if [[ -f "$TARGET" ]]; then
|
if [[ -f "$TARGET" ]]; then
|
||||||
@@ -28,6 +42,7 @@ if [[ -f "$TARGET" ]]; then
|
|||||||
else
|
else
|
||||||
echo "cannot compile anonymous.ten.c as 32-bit, sorry."
|
echo "cannot compile anonymous.ten.c as 32-bit, sorry."
|
||||||
echo "will run 64-bit version directly."
|
echo "will run 64-bit version directly."
|
||||||
|
make anonymous.ten.64
|
||||||
sleep 3
|
sleep 3
|
||||||
echo "$ ./$TARGET.64"
|
echo "$ ./$TARGET.64"
|
||||||
./"$TARGET".64
|
./"$TARGET".64
|
||||||
|
|||||||
+19
-1
@@ -1,6 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 2011/akari
|
||||||
|
#
|
||||||
|
|
||||||
make clobber akari || exit 1
|
# 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
|
||||||
|
|
||||||
|
# in this case we won't fail if we can't compile the code because we can still
|
||||||
|
# run the supplementary program.
|
||||||
|
make CC="$CC" all >/dev/null
|
||||||
|
|
||||||
|
# clean out old binaries except the entry itself
|
||||||
|
rm -f akari2 akari3 akari4
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
./akari < example.ppm > odd_output.ppm
|
./akari < example.ppm > odd_output.ppm
|
||||||
./akari - - even < example.ppm > even_output.ppm
|
./akari - - even < example.ppm > even_output.ppm
|
||||||
|
|||||||
+16
-1
@@ -1,6 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 2011/dlowe
|
||||||
|
#
|
||||||
|
|
||||||
make clobber dlowe || exit 1
|
# 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
|
||||||
|
|
||||||
|
# in this case we won't fail if we can't compile the code because we can still
|
||||||
|
# run the supplementary program.
|
||||||
|
make CC="$CC" all >/dev/null
|
||||||
|
|
||||||
|
# clear screen after compilation so that only the entry is shown
|
||||||
|
clear
|
||||||
|
|
||||||
./dlowe dlowe.c < dlowe-aux-data/ioccc-winlose-trained.net
|
./dlowe dlowe.c < dlowe-aux-data/ioccc-winlose-trained.net
|
||||||
./dlowe dlowe < dlowe-aux-data/ioccc-winlose-trained.net
|
./dlowe dlowe < dlowe-aux-data/ioccc-winlose-trained.net
|
||||||
|
|||||||
+11
-1
@@ -8,7 +8,17 @@
|
|||||||
# What does it get right and what does it get wrong? Why does it get what it
|
# What does it get right and what does it get wrong? Why does it get what it
|
||||||
# gets wrong wrong?
|
# gets wrong wrong?
|
||||||
|
|
||||||
make everything || exit 1
|
# 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
|
||||||
|
|
||||||
# set up path to program if not set
|
# set up path to program if not set
|
||||||
if [[ -z "$KANG" ]]; then
|
if [[ -z "$KANG" ]]; then
|
||||||
|
|||||||
+11
-1
@@ -8,7 +8,17 @@
|
|||||||
# What does it get right and what does it get wrong? Why does it get what it
|
# What does it get right and what does it get wrong? Why does it get what it
|
||||||
# gets wrong wrong?
|
# gets wrong wrong?
|
||||||
|
|
||||||
make everything || exit 1
|
# 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
|
||||||
|
|
||||||
# set up path to program if not set
|
# set up path to program if not set
|
||||||
if [[ -z "$KANG" ]]; then
|
if [[ -z "$KANG" ]]; then
|
||||||
|
|||||||
+11
-1
@@ -5,7 +5,17 @@
|
|||||||
# What does it get right and what does it get wrong? Why does it get what it
|
# What does it get right and what does it get wrong? Why does it get what it
|
||||||
# gets wrong wrong?
|
# gets wrong wrong?
|
||||||
|
|
||||||
make everything || exit 1
|
# 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
|
||||||
|
|
||||||
# set up path to program if not set
|
# set up path to program if not set
|
||||||
if [[ -z "$KANG" ]]; then
|
if [[ -z "$KANG" ]]; then
|
||||||
|
|||||||
+12
-1
@@ -5,7 +5,18 @@
|
|||||||
# What does it get right and what does it get wrong? Why does it get what it
|
# What does it get right and what does it get wrong? Why does it get what it
|
||||||
# gets wrong wrong?
|
# gets wrong wrong?
|
||||||
|
|
||||||
make everything || exit 1
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# set up path to program if not set
|
# set up path to program if not set
|
||||||
if [[ -z "$KANG" ]]; then
|
if [[ -z "$KANG" ]]; then
|
||||||
|
|||||||
+13
-1
@@ -1,6 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 2012/kang
|
||||||
|
|
||||||
make everything || exit 1
|
# 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
|
||||||
|
|
||||||
echo "$ echo Nineteen hundred and eighty-four | ./kang"
|
echo "$ echo Nineteen hundred and eighty-four | ./kang"
|
||||||
echo Nineteen hundred and eighty-four | ./kang
|
echo Nineteen hundred and eighty-four | ./kang
|
||||||
|
|||||||
+13
-1
@@ -1,6 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 2013/birken
|
||||||
|
|
||||||
make clobber everything 2>/dev/null
|
# 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
|
||||||
|
|
||||||
if [[ -z "$BIRKEN" ]]; then
|
if [[ -z "$BIRKEN" ]]; then
|
||||||
BIRKEN="birken.alt"
|
BIRKEN="birken.alt"
|
||||||
|
|||||||
Reference in new issue
Block a user