summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-06-20 01:31:21 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:36 +0100
commit5e310e0fcaa0f41fd079b9ef8c35daffb92801ef (patch)
tree4f573feba9e638585b7fd1662005473485ff48bf /helpers
parentb7ccfa63cac8e9cbfd3e2cf5173c21f148e2a23e (diff)
downloadlive-build-5e310e0fcaa0f41fd079b9ef8c35daffb92801ef.zip
live-build-5e310e0fcaa0f41fd079b9ef8c35daffb92801ef.tar.gz
Migrate a few uses of grep to In_list.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_iso13
-rwxr-xr-xhelpers/lh_binary_net2
-rwxr-xr-xhelpers/lh_binary_tar2
-rwxr-xr-xhelpers/lh_binary_usb-hdd2
-rwxr-xr-xhelpers/lh_bootstrap_debootstrap9
-rwxr-xr-xhelpers/lh_source_iso2
-rwxr-xr-xhelpers/lh_source_net2
-rwxr-xr-xhelpers/lh_source_tar2
-rwxr-xr-xhelpers/lh_source_usb-hdd2
9 files changed, 17 insertions, 19 deletions
diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso
index 32d4148..0fc09e2 100755
--- a/helpers/lh_binary_iso
+++ b/helpers/lh_binary_iso
@@ -28,7 +28,7 @@ Arguments "${@}"
Read_conffile config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if ! echo "${LH_BINARY_IMAGES}" | grep -qs iso
+if ! In_list iso "${LH_BINARY_IMAGES}"
then
exit 0
fi
@@ -124,13 +124,12 @@ case "${LH_BOOTLOADER}" in
;;
esac
-if [ "${LH_DEBIAN_INSTALLER}" != "live" ]
+if In_list "stripped minimal" "${LH_PACKAGES_LISTS}"
then
- case "${LH_PACKAGES_LISTS}" in
- stripped|minimal)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -m ${GENISOIMAGE_EXCLUDE}"
- ;;
- esac
+ if [ "${LH_DEBIAN_INSTALLER}" != "live" ]
+ then
+ GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -m ${GENISOIMAGE_EXCLUDE}"
+ fi
fi
cat > binary.sh << EOF
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 9dae63f..9e9c91b 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -28,7 +28,7 @@ Arguments "${@}"
Read_conffile config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if ! echo "${LH_BINARY_IMAGES}" | grep -qs net
+if ! In_list net "${LH_BINARY_IMAGES}"
then
exit 0
fi
diff --git a/helpers/lh_binary_tar b/helpers/lh_binary_tar
index 2b3df64..8fb5a3a 100755
--- a/helpers/lh_binary_tar
+++ b/helpers/lh_binary_tar
@@ -28,7 +28,7 @@ Arguments "${@}"
Read_conffile config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if ! echo "${LH_BINARY_IMAGES}" | grep -qs tar
+if ! In_list tar "${LH_BINARY_IMAGES}"
then
exit 0
fi
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd
index 033717a..4f5e616 100755
--- a/helpers/lh_binary_usb-hdd
+++ b/helpers/lh_binary_usb-hdd
@@ -28,7 +28,7 @@ Arguments "${@}"
Read_conffile config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if ! echo "${LH_BINARY_IMAGES}" | grep -qs usb-hdd
+if ! In_list usb-hdd "${LH_BINARY_IMAGES}"
then
exit 0
fi
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap
index dcf1052..12b9743 100755
--- a/helpers/lh_bootstrap_debootstrap
+++ b/helpers/lh_bootstrap_debootstrap
@@ -86,11 +86,10 @@ if [ "${LH_USE_FAKEROOT}" != "enabled" ]
then
if [ -z "${LH_BOOTSTRAP_FLAVOUR}" ]
then
- case "${LH_PACKAGES_LISTS}" in
- stripped|minimal)
- DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --variant=minbase"
- ;;
- esac
+ if In_list "stripped minimal" "${LH_PACKAGES_LISTS}"
+ then
+ DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --variant=minbase"
+ fi
else
case "${LH_BOOTSTRAP_FLAVOUR}" in
stripped|minimal)
diff --git a/helpers/lh_source_iso b/helpers/lh_source_iso
index 31a4a85..1538727 100755
--- a/helpers/lh_source_iso
+++ b/helpers/lh_source_iso
@@ -33,7 +33,7 @@ then
exit 0
fi
-if ! echo "${LH_SOURCE_IMAGES}" | grep -qs iso
+if ! In_list iso "${LH_SOURCE_IMAGES}"
then
exit 0
fi
diff --git a/helpers/lh_source_net b/helpers/lh_source_net
index bd79792..f7b6e71 100755
--- a/helpers/lh_source_net
+++ b/helpers/lh_source_net
@@ -33,7 +33,7 @@ then
exit 0
fi
-if ! echo "${LH_SOURCE_IMAGES}" | grep -qs net
+if ! In_list net "${LH_SOURCE_IMAGES}"
then
exit 0
fi
diff --git a/helpers/lh_source_tar b/helpers/lh_source_tar
index c13e9a9..386db67 100755
--- a/helpers/lh_source_tar
+++ b/helpers/lh_source_tar
@@ -33,7 +33,7 @@ then
exit 0
fi
-if ! echo "${LH_SOURCE_IMAGES}" | grep -qs tar
+if ! In_list tar "${LH_SOURCE_IMAGES}"
then
exit 0
fi
diff --git a/helpers/lh_source_usb-hdd b/helpers/lh_source_usb-hdd
index 82d1913..8df36dd 100755
--- a/helpers/lh_source_usb-hdd
+++ b/helpers/lh_source_usb-hdd
@@ -33,7 +33,7 @@ then
exit 0
fi
-if ! echo "${LH_SOURCE_IMAGES}" | grep -qs usb-hdd
+if ! In_list usb-hdd "${LH_SOURCE_IMAGES}"
then
exit 0
fi