Files
Cody Boone Ferguson 51b9d3c096 Slightly modify 1998/dlowe/try scripts
Allow specifying paths to man, col and cat. This is done in a way that
the CC variable should have been done in all the other scripts
(and this one) but I didn't think about it at the time.
2024-01-19 07:09:15 -08:00

31 lines
697 B
Bash
Executable File

#!/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