Use an array.

This commit is contained in:
dak180 2018-05-28 20:00:18 -04:00
parent 45ffcc8cbc
commit 1b48d1c5b7

View file

@ -194,7 +194,16 @@ elif [ ! -e "/dev/${driveID}" ]; then
fi
#check if needed software is installed
for command in grep pcregrep awk sed tr sleep badblocks; do
commands=(
grep
pcregrep
awk
sed
tr
sleep
badblocks
)
for command in "${commands[@]}"; do
if ! type "${command}" &> /dev/null; then
echo "${command} is missing, please install"
exit 100