Closes #2 : Add -o to fix a broken grep on the bash version in cygwin

This commit is contained in:
2013-10-08 14:16:38 -04:00
parent baf7232c79
commit 299377270e

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
bashversion=$(bash --version | head -n 1 | grep "version [0-9]" | cut -d ' ' -f 2) bashversion=$(bash --version | head -n 1 | grep -o "version [0-9]" | cut -d ' ' -f 2)
if [ $bashversion -lt 4 ]; then if [ $bashversion -lt 4 ]; then
echo "cmdarg is incompatible with bash versions < 4.0, please upgrade bash" >&2 echo "cmdarg is incompatible with bash versions < 4.0, please upgrade bash" >&2
exit 1 exit 1