binaryphile / docker-redmine

Redmine Docker image Control Scripts
28 stars 5 forks source link

conditional binary operator expected #4

Open bickerstoff opened 10 years ago

bickerstoff commented 10 years ago

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
binaryphile commented 10 years ago

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.

jauyzed commented 8 years ago

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?

binaryphile commented 8 years ago

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.