Fix 2011/konno + add try.sh + format/typo checks
As it was NOT a documented feature the program now checks for an arg before proceeding. Add try.sh. Format/typo check README.md file. This should complete the review of this entry.
This commit is contained in:
1 parent
7236fee39b
commit
d70df4a6a1
4 files changed
+46
-7
No files matched your search
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2011/konno
|
||||
#
|
||||
|
||||
# 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 "$ ./konno qwerty" 1>&2
|
||||
./konno qwerty
|
||||
echo 1>&2
|
||||
|
||||
echo "$ ./konno ioccc" 1>&2
|
||||
./konno ioccc
|
||||
echo 1>&2
|
||||
|
||||
echo "$ ./konno \"the quick brown fox jumps over the lazy dog\"" 1>&2
|
||||
./konno "the quick brown fox jumps over the lazy dog"
|
||||
echo 1>&2
|
||||
|
||||
echo "$ ./konno \"\"" 1>&2
|
||||
./konno ""
|
||||
|
||||
Reference in new issue
Block a user