summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2007-09-27 09:45:47 -0300
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:27 +0100
commitf6d9cd49e204a801cec73009cea18e1e0471e4b2 (patch)
treebda1d089a96af043c486c941663ba693d6fd8b39
parent41b9bdebb556adabb8be02ba4f456e3825f87ada (diff)
downloadlive-build-f6d9cd49e204a801cec73009cea18e1e0471e4b2.zip
live-build-f6d9cd49e204a801cec73009cea18e1e0471e4b2.tar.gz
cdebootstrap: simplified code using case instead of if's so it's easier to read
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap23
1 files changed, 13 insertions, 10 deletions
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index b192858..084a378 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -74,12 +74,14 @@ then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --keyring=${LH_BOOTSTRAP_KEYRING}"
fi
-if [ "${LH_PACKAGES_LISTS}" != "minimal" ] && [ "${LH_PACKAGES_LISTS}" != "mini" ]
-then
- CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=standard"
-else
- CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
-fi
+case "${LH_PACKAGES_LISTS}" in
+ minimal|mini)
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
+ ;;
+ *)
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=standard"
+ ;;
+esac
if [ "${LH_DEBUG}" = "enabled" ]
then
@@ -137,10 +139,11 @@ then
fi
# Remove cdebootstrap-helper-diverts (needed at least for minimal flavours)
- if [ "${LH_BOOTSTRAP_FLAVOUR}" = "minimal" ] || [ "${LH_BOOTSTRAP_FLAVOUR}" = "mini" ]
- then
- Chroot "dpkg -P cdebootstrap-helper-diverts"
- fi
+ case "${LH_PACKAGES_LISTS}" in
+ minimal|mini)
+ Chroot "dpkg -P cdebootstrap-helper-diverts"
+ ;;
+ esac
# Deconfiguring cdebootstrap configurations
rm -f chroot/etc/apt/sources.list