summaryrefslogtreecommitdiffstats
path: root/bin/ecompressdir
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-05 00:36:44 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-05 00:36:44 +0000
commit8d5d9379824ef6c7dab60a7e9226225212a7d6d5 (patch)
tree1429e780b7a6ee9c41a6db33f0615460507dbb0b /bin/ecompressdir
parent996077a6d244a0483ad8744b9f91c48197a89ed5 (diff)
downloadportage-8d5d9379824ef6c7dab60a7e9226225212a7d6d5.tar.gz
portage-8d5d9379824ef6c7dab60a7e9226225212a7d6d5.tar.bz2
portage-8d5d9379824ef6c7dab60a7e9226225212a7d6d5.zip
allow people to disable compression by setting the PORTAGE_COMPRESS variables to "" (trunk r6173:6174)
svn path=/main/branches/2.1.2/; revision=6177
Diffstat (limited to 'bin/ecompressdir')
-rwxr-xr-xbin/ecompressdir14
1 files changed, 5 insertions, 9 deletions
diff --git a/bin/ecompressdir b/bin/ecompressdir
index 163230dda..cad0ce26c 100755
--- a/bin/ecompressdir
+++ b/bin/ecompressdir
@@ -3,19 +3,15 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: prepalldocs 3483 2006-06-10 21:40:40Z genone $
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
if [[ -z $1 ]] ; then
- echo "${0##*/}: at least one argument needed" 1>&2
+ vecho "${0##*/}: at least one argument needed" 1>&2
exit 1
fi
# figure out the new suffix
suffix=$(ecompress --suffix)
-if [[ -z ${suffix} ]] ; then
- vecho "${0##*/}: unable to figure out compressed suffix"
- exit 1
-fi
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
# funk_up_dir(action, suffix, binary)
# - action: compress or decompress
@@ -54,8 +50,6 @@ for dir in "$@" ; do
if [[ ! -d ${dir} ]] ; then
vecho "${0##*/}: ${dir#${D}} does not exist!"
continue
- else
- vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}"
fi
# not uncommon for packages to compress doc files themselves
@@ -64,6 +58,8 @@ for dir in "$@" ; do
funk_up_dir "decompress" "bz2" "bunzip2"
# now lets do our work
+ [[ -z ${suffix} ]] && continue
+ vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}"
funk_up_dir "compress" "${suffix}" "ecompress"
done