Autodetect where perl is.

This commit is contained in:
hjp 1998-02-07 22:40:14 +00:00
parent af0347d903
commit b71c085cfb
3 changed files with 17 additions and 1 deletions

View File

@ -6,3 +6,6 @@ errno:
clean: clean:
rm waste rm waste
install: $(BINDIR)/waste install: $(BINDIR)/waste
%: %.pl patchperl
sh ./patchperl $< $@

13
waste/patchperl Normal file
View File

@ -0,0 +1,13 @@
perl=`which perl`
if [ $# -ne 2 ]
then
echo "Usage $0 source target" >&2
exit 1
fi
if [ -z "$perl" ]
then
echo "$0: cannot find perl binary" >&2
exit 1
fi
sed -e "s,@@@perl@@@,$perl," < $1 > $2
exit 0

View File

@ -1,4 +1,4 @@
#!/usr/local/bin/perl #!@@@perl@@@
# #
# Report wasted space. # Report wasted space.