[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix "znew -K" to work without use of compress utility
From: |
Jim Meyering |
Subject: |
Re: [PATCH] Fix "znew -K" to work without use of compress utility |
Date: |
Mon, 01 Feb 2010 11:08:52 +0100 |
Jim Meyering wrote:
> Dmitry V. Levin wrote:
>> * znew.in: Change -K option to imply -t, do not use compress(1).
>> * znew.1: Document it.
>> * tests/znew-k: New test.
>> * Makefile.am (TESTS): Add it.
>> ---
>> znew(1) can try to use compress(1) in certain circumstances, and it
>> fails to handle the case when this external utility is not available.
>> Proposed fix changes "znew -K" behaviour to imply -t option, so
>> znew(1) will no longer use compress(1).
>>
>> Makefile.am | 3 ++-
>> tests/znew-k | 42 ++++++++++++++++++++++++++++++++++++++++++
>> znew.1 | 3 ++-
>> znew.in | 8 +++-----
>> 4 files changed, 49 insertions(+), 7 deletions(-)
>> create mode 100755 tests/znew-k
>
> Hi Dmitry,
>
> Thanks for the patch, and especially the added test.
> I'm looking at it now, and will probably apply it with this tiny change:
> ($PWD is not portable enough, and besides is not needed here,
> since path_prepend_ resolves it for you)
>
> diff --git a/tests/znew-k b/tests/znew-k
> index 652a9c8..f8430bd 100755
> --- a/tests/znew-k
> +++ b/tests/znew-k
> @@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
> fi
>
> : ${srcdir=.}
> -. "$srcdir/tests/init.sh"; path_prepend_ "$PWD"
> +. "$srcdir/tests/init.sh"; path_prepend_ .
Actually, I'm using this, now:
. "$srcdir/tests/init.sh"; path_prepend_ . "`pwd`"
> cat <<'EOF' >compress || framework_failure
> #!/bin/sh
The "." is required to get the just-created gzip in the build directory,
and "`pwd`" is required to ensure that the just-created compress
script is in PATH.