From 8a47fa9512eb355e8f7cbe4b4e7d28373e706a6c Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sat, 11 Aug 2007 21:14:53 +0000 Subject: Coding style change, use -n and -z for variable tests Signed-off-by: Aaron Griffin git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@209 880c04e9-e011-0410-abf7-b926e227c9cd --- install/autodetect | 2 +- install/base | 2 +- install/fw | 2 +- install/ide | 2 +- install/pata | 2 +- install/pcmcia | 2 +- install/sata | 2 +- install/scsi | 2 +- install/usb | 2 +- install/usbinput | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'install') diff --git a/install/autodetect b/install/autodetect index e52220e..eba31d3 100644 --- a/install/autodetect +++ b/install/autodetect @@ -23,7 +23,7 @@ install () if [ $UID -eq 0 -o "$(groups | grep disk)" != "" ]; then for fs in $(findfs | sort | uniq); do for mod in $(find "${MODULEDIR}" -type f -name "${fs}.ko"); do - if [ "x${mod}" != "x" ]; then + if [ -n "${mod}" ]; then AUTODETECT="${AUTODETECT} ${mod}" fi done diff --git a/install/base b/install/base index 01d5a04..b601eac 100644 --- a/install/base +++ b/install/base @@ -27,7 +27,7 @@ install () add_file "/lib/initcpio/init" "/init" add_file "${CONFIG}" "/config" - if [ "x${MESSAGE}" != "x" ]; then + if [ -n "${MESSAGE}" ]; then echo -e "${MESSAGE}" > ${MESSAGEFILE} add_file "${MESSAGEFILE}" "/message" fi diff --git a/install/fw b/install/fw index 2f42851..008e8b4 100644 --- a/install/fw +++ b/install/fw @@ -5,7 +5,7 @@ install () MODULES=" $(checked_modules "/firewire/") $(checked_modules "/ieee1394/") " MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} firewire-sbp2 sbp2 sd_mod sr_mod" fi BINARIES="" diff --git a/install/ide b/install/ide index 8d241d8..3840843 100644 --- a/install/ide +++ b/install/ide @@ -5,7 +5,7 @@ install () MODULES=" $(checked_modules "/ide/" | grep -v "legacy") "; MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} ide-disk ide-cd" fi diff --git a/install/pata b/install/pata index c3da76f..2ac1218 100644 --- a/install/pata +++ b/install/pata @@ -6,7 +6,7 @@ install () $(checked_modules "ata/ata_piix")" MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} sd_mod sr_mod" fi diff --git a/install/pcmcia b/install/pcmcia index b5ca7fb..944e2f6 100644 --- a/install/pcmcia +++ b/install/pcmcia @@ -4,7 +4,7 @@ install () { MODULES=" $(checked_modules '/pcmcia/' | grep -ve 'sound' -e 'net') $(checked_modules '/ide/legacy')" MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} sd_mod sr_mod ide-disk ide-cd" fi BINARIES="/sbin/pcmcia-socket-startup.static /sbin/pcmcia-check-broken-cis.static" diff --git a/install/sata b/install/sata index 61f7dda..770bb8f 100644 --- a/install/sata +++ b/install/sata @@ -8,7 +8,7 @@ install () $(checked_modules "ata/pdc_adma") $(checked_modules "ata/ata_piix")" MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} sd_mod sr_mod" fi diff --git a/install/scsi b/install/scsi index 396de33..b1c8062 100644 --- a/install/scsi +++ b/install/scsi @@ -7,7 +7,7 @@ install () $(checked_modules "/fusion/")" MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} sd_mod sr_mod" fi BINARIES="" diff --git a/install/usb b/install/usb index f528322..f3f5bff 100644 --- a/install/usb +++ b/install/usb @@ -5,7 +5,7 @@ install () MODULES=" $(checked_modules "/usb/host" | grep -ve "_cs" -e "sl1811-hcd" -e "isp116x-hcd")" MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} usb_storage sd_mod sr_mod" fi BINARIES="" diff --git a/install/usbinput b/install/usbinput index 3a7196b..d2012b6 100644 --- a/install/usbinput +++ b/install/usbinput @@ -5,7 +5,7 @@ install () MODULES=" $(checked_modules "/usb/host" | grep -ve "_cs" -e "sl1811-hcd" -e "isp116x-hcd") " MODULES=$(echo ${MODULES}) #trim whitespace - if [ "x${MODULES}" != "x" ]; then + if [ -n "${MODULES}" ]; then MODULES="${MODULES} usbhid" fi BINARIES="" -- cgit v1.2.3-24-g4f1b