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:
|
## To use:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./dlowe < anyfile > pootfile
|
./dlowe < file > pootfile
|
||||||
|
|
||||||
|
./dlowe < file
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -42,6 +44,8 @@ Also try:
|
|||||||
./try.sh
|
./try.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Did you spot the Easter egg there?
|
||||||
|
|
||||||
|
|
||||||
## Alternate code:
|
## Alternate code:
|
||||||
|
|
||||||
@@ -59,7 +63,7 @@ make alt
|
|||||||
### Alternate use:
|
### Alternate use:
|
||||||
|
|
||||||
```
|
```
|
||||||
./dlowe.alt < anyfile > pootfile
|
./dlowe.alt < file > pootfile
|
||||||
```
|
```
|
||||||
|
|
||||||
What's the difference between this and `dlowe`?
|
What's the difference between this and `dlowe`?
|
||||||
@@ -71,6 +75,9 @@ What's the difference between this and `dlowe`?
|
|||||||
./try.alt.sh
|
./try.alt.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Did you spot the Easter egg there?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
|
|||||||
@@ -5,18 +5,18 @@
|
|||||||
|
|
||||||
make everything || exit 1
|
make everything || exit 1
|
||||||
|
|
||||||
CAT="$(type -P cat)"
|
[[ -z "$CAT" ]] && CAT="$(type -P cat)"
|
||||||
MAN="$(type -P man)"
|
[[ -z "$MAN" ]] && MAN="$(type -P man)"
|
||||||
COL="$(type -P col)"
|
[[ -z "$COL" ]] && COL="$(type -P col)"
|
||||||
|
|
||||||
if [[ -z "$CAT" || ! -e "$CAT" ]]; then
|
if [[ -z "$CAT" || ! -e "$CAT" ]]; then
|
||||||
echo "$0: no cat found" 1>&2
|
echo "$0: no cat '$CAT' found" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ -z "$COL" || ! -e "$COL" ]]; then
|
elif [[ -z "$COL" || ! -e "$COL" ]]; then
|
||||||
echo "$0: col not found" 1>&2
|
echo "$0: col '$COL' not found" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
|
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
|
||||||
echo "$0: can't execute man" 1>&2
|
echo "$0: can't execute '$MAN'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -5,18 +5,18 @@
|
|||||||
|
|
||||||
make all || exit 1
|
make all || exit 1
|
||||||
|
|
||||||
CAT="$(type -P cat)"
|
[[ -z "$CAT" ]] && CAT="$(type -P cat)"
|
||||||
MAN="$(type -P man)"
|
[[ -z "$MAN" ]] && MAN="$(type -P man)"
|
||||||
COL="$(type -P col)"
|
[[ -z "$COL" ]] && COL="$(type -P col)"
|
||||||
|
|
||||||
if [[ -z "$CAT" || ! -e "$CAT" ]]; then
|
if [[ -z "$CAT" || ! -e "$CAT" ]]; then
|
||||||
echo "$0: no cat found" 1>&2
|
echo "$0: no cat '$CAT' found" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ -z "$COL" || ! -e "$COL" ]]; then
|
elif [[ -z "$COL" || ! -e "$COL" ]]; then
|
||||||
echo "$0: col not found" 1>&2
|
echo "$0: col '$COL' not found" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
|
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
|
||||||
echo "$0: can't execute man" 1>&2
|
echo "$0: can't execute '$MAN'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user