-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathtry.sh
More file actions
executable file
·42 lines (38 loc) · 1.31 KB
/
try.sh
File metadata and controls
executable file
·42 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC entry 1994/westley
#
# make sure CC is set so that one can control what compiler to use in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
# check for 80 columns
COLS="$(tput cols)"
if [[ "$COLS" != 80 ]]; then
echo "WARNING: without a terminal with 80 columns, 8 character tabs and wraparound" 1>&2
echo "this will not look that great. We have detected that you do not have your terminal" 1>&2
echo -n "at 80 columns. Do you still wish to continue (Y/N)? "
read -r -p ""
if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then
exit 1
fi
fi
clear
"${CC}" -Describe -Door westley.c
"${CC}" -Describe -Drain westley.c
"${CC}" -Describe -Dwarf westley.c
"${CC}" -Describe -Debris westley.c # or -Dungeon
"${CC}" -Describe -Desk westley.c
"${CC}" -Describe -Dime westley.c
"${CC}" -Describe -Directory westley.c
"${CC}" -Dial -DUNgeon0614 westley.c
"${CC}" -Drink -Daiquiri westley.c
"${CC}" -Drop -Daiquiri westley.c
"${CC}" -Drop -Dwarf -Daiquiri westley.c # or -Drop -Down -Daiquiri
"${CC}" -Describe -Document westley.c
"${CC}" -Depress -Dotted -Dog westley.c
"${CC}" -Depress -Dalmatian westley.c # also accepts "Dalmation" [sic]
"${CC}" -Deposit -Dime westley.c
"${CC}" -Drop -Donut westley.c
"${CC}" -Drop -Donut -Down -Drain westley.c # or -Drop -Dwarf -Donut