Fix the case where all arguments are filtered out by
authorZac Medico <zmedico@gentoo.org>
Thu, 25 Sep 2008 13:30:33 +0000 (13:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 25 Sep 2008 13:30:33 +0000 (13:30 -0000)
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES, since otherwise 'set' was
called with no arguments which caused the environment to be
displayed on stdout.

svn path=/main/trunk/; revision=11539

bin/ecompress

index c20bfa1e1916266feec91ad7cdbb1ca096aeae7c..e5f8808a98b2204395f0667bbcd19c20056443f5 100755 (executable)
@@ -77,7 +77,8 @@ case $1 in
                        filtered_args[$i]=$x
                        (( i++ ))
                done
-               set "${filtered_args[@]}"
+               [ $i -eq 0 ] && exit 0
+               set -- "${filtered_args[@]}"
 
                # If a compressed version of the file already exists, simply
                # delete it so that the compressor doesn't whine (bzip2 will