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:
1 parent
99e79b1e13
commit
51b9d3c096
3 files changed
+21
-14
No files matched your search
@@ -11,7 +11,9 @@ below for more details.
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./dlowe < anyfile > pootfile
|
||||
./dlowe < file > pootfile
|
||||
|
||||
./dlowe < file
|
||||
```
|
||||
|
||||
|
||||
@@ -42,6 +44,8 @@ Also try:
|
||||
./try.sh
|
||||
```
|
||||
|
||||
Did you spot the Easter egg there?
|
||||
|
||||
|
||||
## Alternate code:
|
||||
|
||||
@@ -59,7 +63,7 @@ make alt
|
||||
### Alternate use:
|
||||
|
||||
```
|
||||
./dlowe.alt < anyfile > pootfile
|
||||
./dlowe.alt < file > pootfile
|
||||
```
|
||||
|
||||
What's the difference between this and `dlowe`?
|
||||
@@ -71,6 +75,9 @@ What's the difference between this and `dlowe`?
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
Did you spot the Easter egg there?
|
||||
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
make everything || 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
|
||||
|
||||
|
||||
+6
-6
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user