summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-06-19 19:49:16 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:35 +0100
commit988db3ba49f0ee7ee6113acf97e83a1ab118cf06 (patch)
treefb86411115e38205401fcff954394595c4912ae0
parent5f3168deb73fd1e92bec83eb839b5d7381b6b023 (diff)
downloadvyos-live-build-988db3ba49f0ee7ee6113acf97e83a1ab118cf06.tar.gz
vyos-live-build-988db3ba49f0ee7ee6113acf97e83a1ab118cf06.zip
Consolidate grep text searching predicates to use "grep -qs"
If this is deemed not portable enough in the future, it should be easy enough to find/replace.
-rwxr-xr-xhelpers/lh_binary_local-includes2
-rwxr-xr-xhelpers/lh_binary_net2
-rwxr-xr-xhelpers/lh_binary_syslinux2
-rwxr-xr-xhelpers/lh_binary_tar2
-rwxr-xr-xhelpers/lh_chroot_local-includes2
-rwxr-xr-xhelpers/lh_source_debian-live2
-rwxr-xr-xhelpers/lh_source_net2
-rwxr-xr-xhelpers/lh_source_tar2
8 files changed, 8 insertions, 8 deletions
diff --git a/helpers/lh_binary_local-includes b/helpers/lh_binary_local-includes
index 04e429e94..57918bd1a 100755
--- a/helpers/lh_binary_local-includes
+++ b/helpers/lh_binary_local-includes
@@ -42,7 +42,7 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if ls -A config/binary_local-includes/ | grep . > /dev/null 2>&1
+if ls -A config/binary_local-includes/ | grep -qs .
then
# Copying includes
cd config/binary_local-includes
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 3b5076eda..9dae63fbc 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -78,7 +78,7 @@ case "${LH_NET_TARBALL}" in
;;
gzip)
- if gzip --help | grep -q "\-\-rsyncable"
+ if gzip --help | grep -qs "\-\-rsyncable"
then
tar cf binary-net.tar "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
gzip --rsyncable --best binary-net.tar
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 57304e3c9..f0338ae5f 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -280,7 +280,7 @@ Configure_syslinux_templates ()
# Syslinux v3.31 in etch does not support include statements
if [ "${LH_DISTRIBUTION}" = "etch" ]
then
- while grep -q ^include ${SCREEN_PATH}/syslinux.cfg
+ while grep -qs ^include ${SCREEN_PATH}/syslinux.cfg
do
INCLUDES=$(grep ^include ${SCREEN_PATH}/syslinux.cfg |awk '{print $2}')
diff --git a/helpers/lh_binary_tar b/helpers/lh_binary_tar
index 7560bce15..2b3df64e7 100755
--- a/helpers/lh_binary_tar
+++ b/helpers/lh_binary_tar
@@ -50,7 +50,7 @@ Create_lockfile .lock
# Remove old binary
rm -f binary.tar.gz
-if gzip --help | grep -q '\-\-rsyncable'
+if gzip --help | grep -qs '\-\-rsyncable'
then
tar cf binary-tar.tar binary
gzip --rsyncable --best binary-tar.tar
diff --git a/helpers/lh_chroot_local-includes b/helpers/lh_chroot_local-includes
index 49d1c801e..697c33b6b 100755
--- a/helpers/lh_chroot_local-includes
+++ b/helpers/lh_chroot_local-includes
@@ -42,7 +42,7 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if ls -A config/chroot_local-includes/ | grep . > /dev/null 2>&1
+if ls -A config/chroot_local-includes/ | grep -qs .
then
# Copying includes
cd config/chroot_local-includes
diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live
index c82ca29f2..cd252ced3 100755
--- a/helpers/lh_source_debian-live
+++ b/helpers/lh_source_debian-live
@@ -60,7 +60,7 @@ cp -a config source/debian-live
# Create tarball
cd source
-if gzip --help | grep -q '\-\-rsyncable'
+if gzip --help | grep -qs '\-\-rsyncable'
then
tar cf debian-live-config_$(date +%Y%m%d.%s).tar debian-live
gzip --rsyncable --best debian-live-config_$(date +%Y%m%d.%s).tar
diff --git a/helpers/lh_source_net b/helpers/lh_source_net
index 76c9f946b..bd797923c 100755
--- a/helpers/lh_source_net
+++ b/helpers/lh_source_net
@@ -59,7 +59,7 @@ then
fi
# Create tarball
-if gzip --help | grep -q '\-\-rsyncable'
+if gzip --help | grep -qs '\-\-rsyncable'
then
tar cf source-net.tar source
gzip --rsyncable --best source-net.tar
diff --git a/helpers/lh_source_tar b/helpers/lh_source_tar
index df8be3b2c..c13e9a93d 100755
--- a/helpers/lh_source_tar
+++ b/helpers/lh_source_tar
@@ -60,7 +60,7 @@ then
fi
# Create tarball
-if gzip --help | grep -q '\-\-rsyncable'
+if gzip --help | grep -qs '\-\-rsyncable'
then
tar cf source.tar source
gzip --rsyncable --best source.tar