summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-09-11 09:39:13 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:46 +0100
commitec83843d6e5e7b1ca8473cf7f9b05fdfe10d220f (patch)
tree698870045e2c5a468166df30694ec67b6522462e /functions
parenta8e71bdb038388640eeb2276f6697546aded3505 (diff)
downloadlive-build-ec83843d6e5e7b1ca8473cf7f9b05fdfe10d220f.zip
live-build-ec83843d6e5e7b1ca8473cf7f9b05fdfe10d220f.tar.gz
Allowing to overwrite default gzip options through config switch or option.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/defaults.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index cbff1f9..4708857 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -74,6 +74,16 @@ Set_defaults ()
APT_OPTIONS="${APT_OPTIONS:---yes}"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes}"
+ GZIP_OPTIONS="${GZIP_OPTIONS:---best}"
+
+ if gzip --help | grep -qs "\-\-rsyncable" && \
+ ! echo ${GZIP_OPTIONS} | grep -q rsyncable
+ then
+ GZIP_OPTIONS="${GZIP_OPTIONS} --rsyncable"
+ else
+ GZIP_OPTIONS="$(echo ${GZIP_OPTIONS} | sed -e 's|--rsyncable||')"
+ fi
+
# Setting apt recommends
case "${LH_MODE}" in
debian|debian-release|ubuntu)