Makefile.in | 4 +++- configure.ac | 12 ++++++++++++ quilt/grep.in | 2 +- quilt/patches.in | 2 +- quilt/upgrade.in | 4 ++-- scripts/patchfns.in | 8 ++++---- 6 files changed, 23 insertions(+), 9 deletions(-) --- quilt.orig/Makefile.in 2005-09-15 11:08:06.000000000 +0200 +++ quilt/Makefile.in 2005-09-15 11:42:25.000000000 +0200 @@ -20,6 +20,7 @@ INSTALL := @INSTALL@ PERL := @PERL@ BASH := @BASH@ +GREP := @GREP@ SED := @SED@ AWK := @AWK@ DIFF := @DIFF@ @@ -150,7 +151,7 @@ head -n 1; \ echo ; \ (@BASH@ -c ". scripts/patchfns ; LC_ALL=C . $$here/$$cmd -h")| \ - grep -v 'Usage: quilt' | \ + @GREP@ -v 'Usage: quilt' | \ sed -e $$'s/^\t//' \ -e $$'s/\t/\\\n/' | \ sed -e 's/^\(-.*\)$$/.IP " \1" 8/' \ @@ -214,6 +215,7 @@ -e 's:@SCRIPTS''@:$(SCRIPTS_DIR):g' \ -e 's:@PERL''@:$(PERL):g' \ -e 's:@BASH''@:$(BASH):g' \ + -e 's:@GREP''@:$(GREP):g' \ -e 's:@SED''@:$(SED):g' \ -e 's:@AWK''@:$(AWK):g' \ -e 's:@TAIL''@:$(TAIL):g' \ --- quilt.orig/configure.ac 2005-09-15 11:04:55.000000000 +0200 +++ quilt/configure.ac 2005-09-15 11:41:26.000000000 +0200 @@ -77,6 +77,18 @@ AC_MSG_ERROR([Please specify the location of Perl with the option '--with-perl']) fi +dnl Check for grep +AC_ARG_WITH(grep, AC_HELP_STRING( + [--with-grep], [name of the grep executable to use]), + [ + GREP="$withval" + AC_SUBST(GREP) + AC_MSG_NOTICE([Using grep executable $GREP]) + ],[ + GREP="grep" + AC_SUBST(GREP) + ]) + dnl Check for sed AC_ARG_WITH(sed, AC_HELP_STRING( [--with-sed], [name of the sed executable to use]), --- quilt.orig/quilt/grep.in 2004-07-14 15:39:35.000000000 +0200 +++ quilt/quilt/grep.in 2005-09-15 11:47:13.000000000 +0200 @@ -118,7 +118,7 @@ -path "./$QUILT_PATCHES/*" -o \ -path "./$QUILT_PC/*" \) -prune -o \ -type f -print \ -| xargs grep $opt_H "address@hidden" \ +| xargs @GREP@ $opt_H "address@hidden" \ | if [ address@hidden -eq 0 ]; then @SED@ -e 's,^./,,' else --- quilt.orig/quilt/patches.in 2005-07-19 07:56:54.000000000 +0200 +++ quilt/quilt/patches.in 2005-09-15 11:47:33.000000000 +0200 @@ -74,7 +74,7 @@ for patch in "$@" do if touched_by_patch $(patch_strip_level $patch) $patch \ - | grep -q "^$file_bre\$" + | @GREP@ -q "^$file_bre\$" then echo "$prefix$(print_patch $patch)" fi --- quilt.orig/quilt/upgrade.in 2004-09-14 01:03:07.000000000 +0200 +++ quilt/quilt/upgrade.in 2005-09-15 11:47:52.000000000 +0200 @@ -76,7 +76,7 @@ for patch in $(applied_patches) do - proper_name="$(grep -E -e '^'"$(quote_re $patch)"'(|\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)' $SERIES)" + proper_name="$(@GREP@ -E -e '^'"$(quote_re $patch)"'(|\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)' $SERIES)" proper_name=${proper_name#$QUILT_PATCHES/} proper_name=${proper_name%% *} if [ -z "$proper_name" ] @@ -86,7 +86,7 @@ fi if [ "$patch" != "$proper_name" -a -d $QUILT_PC/$patch ] \ - && grep -q "^$(quote_bre $patch)\$" \ + && @GREP@ -q "^$(quote_bre $patch)\$" \ $QUILT_PC/applied-patches then mv $QUILT_PC/$patch $QUILT_PC/$proper_name \ --- quilt.orig/scripts/patchfns.in 2005-09-15 11:09:15.000000000 +0200 +++ quilt/scripts/patchfns.in 2005-09-15 11:49:21.000000000 +0200 @@ -183,7 +183,7 @@ then return 1 else - grep -q -E "^$(quote_re $patch)([ \t]|$)" $SERIES + @GREP@ -q -E "^$(quote_re $patch)([ \t]|$)" $SERIES fi } @@ -313,14 +313,14 @@ is_numeric() { - echo $1 | grep -q '^[0-9]*$' + echo $1 | @GREP@ -q '^[0-9]*$' } is_applied() { local patch=$1 [ -e $DB ] || return 1 - grep -q -E "^$(quote_re $patch)\$" $DB + @GREP@ -q -E "^$(quote_re $patch)\$" $DB } applied_patches() @@ -413,7 +413,7 @@ local tmpfile if tmpfile=$(gen_tempfile) then - grep -v -E "^$(quote_re $patch)\$" $DB > $tmpfile + @GREP@ -v -E "^$(quote_re $patch)\$" $DB > $tmpfile cat $tmpfile > $DB rm -f $tmpfile [ -s $DB ] || rm -f $DB