On 09/25/2018 12:18 PM, Michał Górny wrote:
> ---
>  bin/ecompress      | 1 +
>  bin/ecompress-file | 9 +++------
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/bin/ecompress b/bin/ecompress
> index e4fdc3934..4a2c8a99a 100755
> --- a/bin/ecompress
> +++ b/bin/ecompress
> @@ -53,6 +53,7 @@ while [[ $# -gt 0 ]] ; do
>                               # skip the compressed variants (bug #667072)
>                               case ${path} in
>                                       *.Z|*.gz|*.bz2|*.lzma|*.xz)
> +                                             touch 
> "${T}"/.ecompress_had_precompressed

While we're here, for efficiency we should use the builtin >> operator
instead of touch (also touch has broken in the past,
https://bugs.gentoo.org/348640).

>                                               [[ -s ${path%.*} ]] && continue
>                                               ;;
>                               esac
> diff --git a/bin/ecompress-file b/bin/ecompress-file
> index 27695da1b..bc8fe5451 100755
> --- a/bin/ecompress-file
> +++ b/bin/ecompress-file
> @@ -22,16 +22,13 @@ compress_file() {
>               case ${x} in
>                       *.gz|*.Z)
>                               gunzip -f "${x}" || __helpers_die "gunzip 
> failed"
> -                             x=${x%.*}
> -                             touch "${T}/.ecompress_had_precompressed";;
> +                             x=${x%.*};;
>                       *.bz2)
>                               bunzip2 -f "${x}" || __helpers_die "bunzip2 
> failed"
> -                             x=${x%.bz2}
> -                             touch "${T}/.ecompress_had_precompressed";;
> +                             x=${x%.bz2};;
>                       *.lzma|*.xz)
>                               unxz -f "${x}" || __helpers_die "unxz failed"
> -                             x=${x%.*}
> -                             touch "${T}/.ecompress_had_precompressed";;
> +                             x=${x%.*};;
>               esac
>  
>               filtered_args+=( "$x" )
> 
-- 
Thanks,
Zac

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to