annotate protein_generator.sh @ 5:795f289b64db draft

First complete upload, containing the datatype TAR.
author da-intersect
date Wed, 10 Apr 2013 02:41:02 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
1 #!/bin/bash
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
2
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
3 if (type -p java >> /dev/null); then
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
4 _java=java
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
5 elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
6 _java="$JAVA_HOME/bin/java"
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
7 else
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
8 echo "You must install java before runing this tool"
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
9 exit 1
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
10 fi
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
11
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
12 if [[ "$_java" ]]; then
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
13 version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
14 if ! [[ "$version" > "1.6" ]]; then
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
15 echo "Java version should be > 1.6"
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
16 exit 1
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
17 fi
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
18 fi
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
19
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
20 if [ $# -eq 0 ]
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
21 then
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
22 echo "USAGE ap11Runner.sh APPNAME [ARGS]";
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
23 exit;
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
24 fi
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
25
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
26 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
27
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
28 jar_path="${DIR}/jars/${1}"
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
29 shift
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
30
795f289b64db First complete upload, containing the datatype TAR.
da-intersect
parents:
diff changeset
31 java -jar $jar_path $@