Use internal BASH_VERSINFO variable

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-03-04 23:31:30 +01:00
parent 938b6c8081
commit 6b0a4b55fc
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
( bash --version | grep -q 'version 4' ) || {
[ ${BASH_VERSINFO[0]:-0} -lt 4 ] && {
echo "Bash too old, update to >=4.0"
exit 1
}