commit:     519b35146fdd334dbc2d5168c06ec167d1fc7084
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 28 07:16:58 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 28 20:32:33 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=519b3514

Revert "ecompress-file: de-duplicate filtered_args (bug 667072)"

Reverts: 1fc311ce0afeef9f982213e43220d079a4ffec26
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ecompress-file | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/ecompress-file b/bin/ecompress-file
index e65b21ee4..18269c91b 100755
--- a/bin/ecompress-file
+++ b/bin/ecompress-file
@@ -13,7 +13,7 @@ compress_file() {
        done
        set +f
        mask_ext_re="^(${mask_ext_re:1})\$"
-       local -A filtered_args
+       local filtered_args=()
        local had_precompressed=
        for x in "$@" ; do
                [[ ${x##*.} =~ $mask_ext_re ]] && continue
@@ -35,10 +35,10 @@ compress_file() {
                                had_precompressed=1;;
                esac
 
-               filtered_args[${x}]=
+               filtered_args+=( "$x" )
        done
        [[ ${#filtered_args[@]} -eq 0 ]] && return 0
-       set -- "${!filtered_args[@]}"
+       set -- "${filtered_args[@]}"
 
        if [[ ${had_precompressed} ]]; then
                eqawarn "One or more compressed files were found in 
docompress-ed directories."

Reply via email to