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.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-19 07:09:15 -08:00
1 parent 99e79b1e13
commit 51b9d3c096
3 files changed
+21 -14

No files matched your search

+6 -6
View File
@@ -5,18 +5,18 @@
make all || exit 1
CAT="$(type -P cat)"
MAN="$(type -P man)"
COL="$(type -P col)"
[[ -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 found" 1>&2
echo "$0: no cat '$CAT' found" 1>&2
exit 1
elif [[ -z "$COL" || ! -e "$COL" ]]; then
echo "$0: col not found" 1>&2
echo "$0: col '$COL' not found" 1>&2
exit 1
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
echo "$0: can't execute man" 1>&2
echo "$0: can't execute '$MAN'" 1>&2
exit 1
fi