forked from timpalpant/java-genomics-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoolRunner.sh
More file actions
executable file
·32 lines (28 loc) · 803 Bytes
/
toolRunner.sh
File metadata and controls
executable file
·32 lines (28 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# Help
if [ $# -eq 0 ]
then
echo "USAGE: toolRunner.sh APPNAME [ARGS]";
echo "To list available tools: toolRunner.sh list";
exit
fi
# Get the root directory in case this script is being called from elsewhere
DIR="$( cd "$( dirname $(readlink "${BASH_SOURCE[0]}" ))" && pwd )"
# List the available tools (this is a little hacky)
if [ "$1" = "list" ]
then
for d in `ls $DIR/src/edu/unc/genomics`
do
if [ -d $DIR/src/edu/unc/genomics/$d ]
then
for f in `ls $DIR/src/edu/unc/genomics/$d/*`
do
scriptname=`basename $f .java`
echo $d.$scriptname
done
fi
done
exit
fi
# Run a tool with the passed arguments
java -Xmx2000m -Dlog4j.configuration=log4j.properties -cp $DIR:$DIR/build:$DIR/dist/*:$DIR/lib/* edu.unc.genomics."$@"