cdebootstrap: simplified code using case instead of if's so it's easier to read
This commit is contained in:
parent
9262ebeb92
commit
33ad814b5a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue