Fix last commit to work regardless of nullglob.
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Jun 2011 08:17:38 +0000 (01:17 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Jun 2011 08:17:38 +0000 (01:17 -0700)
bin/ebuild-helpers/ecompress

index 9ff1c563fca629e2dc034ddd4a5872523f1524a9..b61421b002141997eb8dfb81b62f31411499709a 100755 (executable)
@@ -83,7 +83,8 @@ case $1 in
                        # If PORTAGE_COMPRESS_FLAGS contains -k then we need to avoid
                        # having our glob match the uncompressed file here.
                        suffix=$(echo compressme.*)
-                       [[ -z $suffix ]] && suffix=$(echo compressme*)
+                       [[ -z $suffix || "$suffix" == "compressme.*" ]] && \
+                               suffix=$(echo compressme*)
                        suffix=${suffix#compressme}
                        cd /
                        rm -rf "${tmpdir}"