Abort early if curl is missing
This commit is contained in:
parent
3742cbc215
commit
8697daa181
6
nench.sh
6
nench.sh
@ -23,6 +23,12 @@ Bps_to_MiBps()
|
|||||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "error" } }'
|
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "error" } }'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ! command_exists curl
|
||||||
|
then
|
||||||
|
printf '%s\n' 'This script requires curl, but it could not be found.' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
printf '%s\n' '-------------------------'
|
printf '%s\n' '-------------------------'
|
||||||
printf ' nench.sh benchmark\n'
|
printf ' nench.sh benchmark\n'
|
||||||
date -u '+ %F %T UTC'
|
date -u '+ %F %T UTC'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user