| 1 | #!/bin/bash |
| 2 | |
| 3 | usage(){ |
| 4 | echo " |
| 5 | Written by Brian Bushnell |
| 6 | Last modified May 4, 2017 |
| 7 | |
| 8 | Description: Prints the BBTools version number. |
| 9 | Add an argument to print the version name too. |
| 10 | |
| 11 | Usage: bbversion.sh |
| 12 | " |
| 13 | } |
| 14 | |
| 15 | pushd . > /dev/null |
| 16 | DIR="${BASH_SOURCE[0]}" |
| 17 | while [ -h "$DIR" ]; do |
| 18 | cd "$(dirname "$DIR")" |
| 19 | DIR="$(readlink "$(basename "$DIR")")" |
| 20 | done |
| 21 | cd "$(dirname "$DIR")" |
| 22 | DIR="$(pwd)/" |
| 23 | popd > /dev/null |
| 24 | |
| 25 | CP="$DIR""current/" |
| 26 | |
| 27 | bbversion() { |
| 28 | local CMD="java -Xmx80m -cp $CP driver.BBVersion $@" |
| 29 | eval $CMD |
| 30 | } |
| 31 | |
| 32 | bbversion "$@" |