docker-redmine
docker-redmine copied to clipboard
conditional binary operator expected
Issue
When executing ./redmine.sh, I'm getting the following error:
./redmine.sh: line 14: conditional binary operator expected
./redmine.sh: line 14: syntax error near `RAILS_ENV'
./redmine.sh: line 14: `if [[ ! -v RAILS_ENV || "$RAILS_ENV" == development ]]; then'
Details
CentOS 6.5 Docker client 0.7.6 root user
git clone git://github.com/binaryphile/docker-redmine
cd docker-redmine
./redmine.sh
Just tried it again on my machine and it works. It's probably due to a differing version of bash on CentOS, or perhaps a different install location for bash. Try changing the initial line of the redmine.sh script to use /usr/bin/env instead of the bash path.
Im trying this on mac i see the above error listed.
other bash scripts run fine which has #!/bin/bash. Not sure why this might be complaining?
It's the -v test for the variable definition. Your bash is probably older than 4.2. Homebrew must have a more recent version available if you check, I'm sure.