Add 2013/hou/try.sh
This commit is contained in:
1 parent
d4783f02e7
commit
0120eac02b
3 files changed
+54
-9
No files matched your search
+6
-9
@@ -30,17 +30,14 @@ effects should be more or less recognizable when you see 16.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./hou BIG
|
||||
./hou old_default.scene BIG
|
||||
./hou otherroom.scene
|
||||
./hou otherroom.scene NAIVE
|
||||
./try.sh
|
||||
```
|
||||
|
||||
Try opening the file and then let the program run a while and every so often
|
||||
reopen the file, to see how it changes. The author suggests that you leave the
|
||||
program running overnight to see what happens. If however you do not have all
|
||||
night :-) then the following JPEG files should show you what happens with some
|
||||
of the invocations above:
|
||||
Try opening the file noted by the program then let the program run a while and
|
||||
every so often reopen the file, to see how it changes. The author suggests that
|
||||
you leave the program running overnight to see what happens. If however you do
|
||||
not have all night :-) then the following JPEG files should show you what
|
||||
happens with some of the invocations above:
|
||||
|
||||

|
||||
|
||||
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2013/hou
|
||||
#
|
||||
|
||||
# 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 "2013/hou menu" 1>&2
|
||||
echo 1>&2
|
||||
echo "(0) BIG (luna.ppm)" 1>&2
|
||||
echo "(1) old_default.scene BIG (old_default.ppm)" 1>&2
|
||||
echo "(2) otherroom (otherroom.ppm)" 1>&2
|
||||
echo "(3) NAIVE otherroom (otherroom.ppm)" 1>&2
|
||||
echo 1>&2
|
||||
read -rp "Make your selection (0 - 3, anything else to quit): " mode
|
||||
|
||||
case "$mode" in
|
||||
0) # BIG
|
||||
echo "$ ./hou BIG" 1>&2
|
||||
./hou BIG
|
||||
;;
|
||||
1) # old_default BIG
|
||||
echo "$ ./hou old_default.scene BIG" 1>&2
|
||||
./hou old_default.scene BIG
|
||||
;;
|
||||
2) # otherroom
|
||||
echo "$ ./hou otherroom.scene" 1>&2
|
||||
./hou otherroom.scene
|
||||
;;
|
||||
3) # otherroom NAIVE
|
||||
echo "$ ./hou otherroom.scene NAIVE" 1>&2
|
||||
./hou otherroom.scene NAIVE
|
||||
;;
|
||||
*) exit 0
|
||||
;;
|
||||
esac
|
||||
@@ -4031,6 +4031,8 @@ Further, after the file `2013/hou/doc/example.markdown` was moved to
|
||||
[2013/hou/doc/example.md](/2013/hou/doc/example.md) to match the rest of the repo
|
||||
this broke `make` which Cody also fixed.
|
||||
|
||||
Cody also added the [try.sh](/2013/hou/try.sh) script.
|
||||
|
||||
|
||||
## <a name="2013_mills"></a>[2013/mills](/2013/mills/mills.c) ([README.md)[2013/mills/README.md))
|
||||
|
||||
|
||||
Reference in new issue
Block a user