summaryrefslogtreecommitdiff
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/ecompress
parentAvoid pointless population of the binary tree when --buildpkg is enabled. Th... (diff)
downloadportage-multirepo-8d5d9379824ef6c7dab60a7e9226225212a7d6d5.tar.gz
portage-multirepo-8d5d9379824ef6c7dab60a7e9226225212a7d6d5.tar.bz2
portage-multirepo-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/ecompress')
-rwxr-xr-xbin/ecompress12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/ecompress b/bin/ecompress
index 2b2fa814..2006f657 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -3,16 +3,18 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: prepman 5507 2007-01-10 04:22:27Z zmedico $
+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
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
# setup compression stuff
-PORTAGE_COMPRESS=${PORTAGE_COMPRESS:-bzip2}
-if [[ -z ${PORTAGE_COMPRESS_FLAGS} ]] ; then
+PORTAGE_COMPRESS=${PORTAGE_COMPRESS-bzip2}
+[[ -z ${PORTAGE_COMPRESS} ]] && exit 0
+
+if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
case ${PORTAGE_COMPRESS} in
bzip2|gzip) PORTAGE_COMPRESS_FLAGS="-f9";;
esac