Add 1993/ejb/try.sh
This commit is contained in:
1 parent
5609ceaf59
commit
d347b24626
3 files changed
+44
No files matched your search
@@ -18,6 +18,14 @@ level a value from -128 to 127
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./try.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
A negative argument plays the patience puzzle. An argument
|
A negative argument plays the patience puzzle. An argument
|
||||||
|
|||||||
Executable
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 1993/ejb
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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 play the patience puzzle: ./ejb -3: "
|
||||||
|
echo 1>&2
|
||||||
|
./ejb -3
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to play the Tower of Hanoi puzzle: ./ejb 3: "
|
||||||
|
echo 1>&2
|
||||||
|
./ejb 3
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./ejb 0: "
|
||||||
|
echo 1>&2
|
||||||
|
./ejb 0
|
||||||
|
exit 0
|
||||||
@@ -1716,6 +1716,11 @@ first.
|
|||||||
[Cody](#cody) fixed the script to work which assumed that `.` is in the path.
|
[Cody](#cody) fixed the script to work which assumed that `.` is in the path.
|
||||||
|
|
||||||
|
|
||||||
|
## <a name="1993_ejb"></a>[1993/ejb](/1993/ejb/ejb.c) ([README.md](/1993/ejb/README.md]))
|
||||||
|
|
||||||
|
[Cody](#cody) added the [try.sh](/1993/ejb/try.sh) script.
|
||||||
|
|
||||||
|
|
||||||
## <a name="1993_jonth"></a>[1993/jonth](/1993/jonth/jonth.c) ([README.md](/1993/jonth/README.md]))
|
## <a name="1993_jonth"></a>[1993/jonth](/1993/jonth/jonth.c) ([README.md](/1993/jonth/README.md]))
|
||||||
|
|
||||||
Both [Cody](#cody) and [Yusuke](#yusuke) fixed this so that it will work with modern systems. Yusuke
|
Both [Cody](#cody) and [Yusuke](#yusuke) fixed this so that it will work with modern systems. Yusuke
|
||||||
|
|||||||
Reference in new issue
Block a user