Close #7 : use BASH_VERSINFO instead of janky version check
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
bashversion=$(${BASH} --version | head -n 1 | grep -o "version [0-9]" | cut -d ' ' -f 2)
|
if (( BASH_VERSINFO[0] < 4 )); then
|
||||||
if [ $bashversion -lt 4 ]; then
|
echo "cmdarg is incompatible with bash versions < 4, please upgrade bash" >&2
|
||||||
echo "cmdarg is incompatible with bash versions < 4.0, please upgrade bash" >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user