From b71c085cfb652c1d718e8b006a8ff1529c5ad199 Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 7 Feb 1998 22:40:14 +0000 Subject: [PATCH] Autodetect where perl is. --- waste/GNUmakefile | 3 +++ waste/patchperl | 13 +++++++++++++ waste/{waste => waste.pl} | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 waste/patchperl rename waste/{waste => waste.pl} (98%) 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.