Uploaded image for project: 'Deep Backlog'
  1. Deep Backlog
  2. DB-102

igb.zip linux run_igb.sh script does not work when called with sh

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None

      Description

      Both biolinux 7 (ubuntu 12.04) and Ross's Lubuntu (Ubuntu 13.04) return the following errors when attempting to run the igb.zip scripts.

      $ sh run_igb.sh
      run_igb.sh: 43: run_igb.sh: 0: not found
      run_igb.sh: 54: run_igb.sh: VMARGS[0]=-Xmx1024m: not found
      run_igb.sh: 56: run_igb.sh: VMARGS[0]=-Xms32m: not found
      run_igb.sh: 59: run_igb.sh: [[: not found
      run_igb.sh: 69: run_igb.sh: Bad substitution

      In order to fix this, the user must use
      $ bash run_igb.sh
      or better yet
      $ run_igb.sh

      I think it would be a good idea to put a helper error at the top of the script in case someone (like me) runs run_igb.sh the incorrect way

      Example: Just after !#
      if [ ! "$BASH_VERSION" ] ; then
      echo "Please do not use sh to run this script ($0), just execute it directly" 1>&2
      exit 1
      fi
      #script idea found here
      #http://stackoverflow.com/questions/17752204/is-there-a-way-to-force-a-shell-script-to-run-under-bash-instead-of-sh

        Attachments

          Activity

            People

            • Assignee:
              dcnorris David Norris (Inactive)
              Reporter:
              mason Mason Meyer (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: