cdebootstrap: simplified code using case instead of if's so it's easier to read

This commit is contained in:
Otavio Salvador 2007-09-27 09:45:47 -03:00 committed by Daniel Baumann
parent 9262ebeb92
commit 33ad814b5a
1 changed files with 13 additions and 10 deletions

View File

@ -74,12 +74,14 @@ then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --keyring=${LH_BOOTSTRAP_KEYRING}" CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --keyring=${LH_BOOTSTRAP_KEYRING}"
fi fi
if [ "${LH_PACKAGES_LISTS}" != "minimal" ] && [ "${LH_PACKAGES_LISTS}" != "mini" ] case "${LH_PACKAGES_LISTS}" in
then minimal|mini)
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=standard" CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
else ;;
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal" *)
fi CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=standard"
;;
esac
if [ "${LH_DEBUG}" = "enabled" ] if [ "${LH_DEBUG}" = "enabled" ]
then then
@ -137,10 +139,11 @@ then
fi fi
# Remove cdebootstrap-helper-diverts (needed at least for minimal flavours) # Remove cdebootstrap-helper-diverts (needed at least for minimal flavours)
if [ "${LH_BOOTSTRAP_FLAVOUR}" = "minimal" ] || [ "${LH_BOOTSTRAP_FLAVOUR}" = "mini" ] case "${LH_PACKAGES_LISTS}" in
then minimal|mini)
Chroot "dpkg -P cdebootstrap-helper-diverts" Chroot "dpkg -P cdebootstrap-helper-diverts"
fi ;;
esac
# Deconfiguring cdebootstrap configurations # Deconfiguring cdebootstrap configurations
rm -f chroot/etc/apt/sources.list rm -f chroot/etc/apt/sources.list