Add 2000/schneiderwent/try.sh
This commit is contained in:
1 parent
bcf5abfd04
commit
f7ecec003f
3 files changed
+40
No files matched your search
@@ -21,6 +21,13 @@ make
|
||||
|
||||
What's the difference?
|
||||
|
||||
If you have a long while to spare (and you're bored enough that you could watch
|
||||
paint dry :-) ) you might also try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2000/schneiderwent
|
||||
#
|
||||
|
||||
# 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 "This will take a long time to run to completion: " 1>&2
|
||||
i=0
|
||||
while [[ "$i" -lt 60 ]]; do
|
||||
./schneiderwent
|
||||
./schneiderwent schneiderwent.data
|
||||
sleep 60
|
||||
((i++))
|
||||
done
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user