SCECcode/bbp

"select: not found" in easy_install_bp.sh

kevinmilner opened this issue · 2 comments

I'm running the easy_install_bbp.sh script for the current dev branch. It compiles successfully (yay!) but runs into problems when you get to the velocity models section:

kevin@steel:~/git/bbp/setup$ ./easy_install_bbp.sh 
./easy_install_bbp.sh: 47: ./easy_install_bbp.sh: Bad substitution

 ====== Welcome to Broadband Platform 17.3.0 installation script =====

 Using destination directory: /home/kevin/git

=> Creating directory tree...

=> Main Broadband Platform Source Distribution
==> Compiling... (it may take a while)
==> Installed!

 Please select what velocity models (regions) you would like to install:

==> Would you like to install the Northern California region (6.5GB)?
./easy_install_bbp.sh: 120: ./easy_install_bbp.sh: select: not found
./easy_install_bbp.sh: 125: ./easy_install_bbp.sh: Syntax error: "done" unexpected

Also note the "Bad substitution" message at the top.

This is on linux, Xubuntu 16.04 LTS.

Figured it out. The first line should be #!/bin/bash instead of #!/bin/sh as select is specific to BASH.

See https://stackoverflow.com/questions/4178565/use-of-select-gives-syntax-error

Fixed, as indicated by Kevin above.