mirror of
https://github.com/Spearfoot/disk-burnin-and-testing.git
synced 2026-11-25 17:36:20 -05:00
implement dependency check
This commit is contained in:
parent
cfaedeac28
commit
8b3c16cebf
1 changed files with 10 additions and 0 deletions
|
|
@ -131,6 +131,16 @@
|
|||
#
|
||||
########################################################################
|
||||
|
||||
# Check required dependencies
|
||||
readonly DEPENDENCIES="awk badblocks grep sed sleep"
|
||||
for dependency in ${DEPENDENCIES}; do
|
||||
if ! command -v "${dependency}" > /dev/null 2>&1 ; then
|
||||
echo "Command '${dependency}' not found. Exiting ..."
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
# Check script arguments
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Error: not enough arguments!"
|
||||
echo "Usage is: $0 drive_device_specifier"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue