-
-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathtry.sh
More file actions
executable file
·30 lines (25 loc) · 697 Bytes
/
try.sh
File metadata and controls
executable file
·30 lines (25 loc) · 697 Bytes
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
#!/usr/bin/env bash
#
# try.sh - try out 1998/dlowe pootifier
#
make all || exit 1
[[ -z "$CAT" ]] && CAT="$(type -P cat)"
[[ -z "$MAN" ]] && MAN="$(type -P man)"
[[ -z "$COL" ]] && COL="$(type -P col)"
if [[ -z "$CAT" || ! -e "$CAT" ]]; then
echo "$0: no cat '$CAT' found" 1>&2
exit 1
elif [[ -z "$COL" || ! -e "$COL" ]]; then
echo "$0: col '$COL' not found" 1>&2
exit 1
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
echo "$0: can't execute '$MAN'" 1>&2
exit 1
fi
rm -f make.1
read -r -n 1 -p "Press any key to pootify make(1): "
"$MAN" make | "$COL" -b | ./dlowe > make.1
"$MAN" ./make.1
read -r -n 1 -p "Press any key to pootify dlowe.c: "
echo 1>&2
./dlowe < dlowe.c