diff --git a/waste/GNUmakefile b/waste/GNUmakefile index 0105040..af4704d 100644 --- a/waste/GNUmakefile +++ b/waste/GNUmakefile @@ -6,3 +6,6 @@ errno: clean: rm waste install: $(BINDIR)/waste + +%: %.pl patchperl + sh ./patchperl $< $@ diff --git a/waste/patchperl b/waste/patchperl new file mode 100644 index 0000000..3f97eed --- /dev/null +++ b/waste/patchperl @@ -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 diff --git a/waste/waste b/waste/waste.pl similarity index 98% rename from waste/waste rename to waste/waste.pl index a888dea..0a335da 100755 --- a/waste/waste +++ b/waste/waste.pl @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!@@@perl@@@ # # Report wasted space.