mirror of
https://github.com/Spearfoot/disk-burnin-and-testing.git
synced 2026-11-20 06:56:19 -05:00
Use an array.
This commit is contained in:
parent
45ffcc8cbc
commit
1b48d1c5b7
1 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue