From ec83843d6e5e7b1ca8473cf7f9b05fdfe10d220f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 11 Sep 2009 09:39:13 +0200 Subject: Allowing to overwrite default gzip options through config switch or option. --- functions/defaults.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'functions') diff --git a/functions/defaults.sh b/functions/defaults.sh index cbff1f93d..470885759 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) -- cgit v1.2.3