summaryrefslogtreecommitdiff
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
parentb7ccfa63cac8e9cbfd3e2cf5173c21f148e2a23e (diff)
downloadvyos-live-build-5e310e0fcaa0f41fd079b9ef8c35daffb92801ef.tar.gz
vyos-live-build-5e310e0fcaa0f41fd079b9ef8c35daffb92801ef.zip
Migrate a few uses of grep to In_list.
-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 32d4148b4..0fc09e275 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 9dae63fbc..9e9c91bdc 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 2b3df64e7..8fb5a3ab3 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 033717aee..4f5e6162f 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 dcf1052b0..12b974326 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 31a4a8555..1538727d7 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 bd797923c..f7b6e71b4 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 c13e9a93d..386db6700 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 82d19131f..8df36ddbe 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