Mercurial > repos > diego > rtg_investigator
comparison tools/rtg/galaxy-rtg-wrapper.sh @ 1:8593828f91e7 default tip
Full galaxy wrapper
author | diego |
---|---|
date | Sat, 21 Apr 2012 21:36:15 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:d50638ebd809 | 1:8593828f91e7 |
---|---|
1 #!/bin/sh | |
2 | |
3 DIR="$( cd "$( dirname "$0" )" && pwd )" | |
4 source $DIR/rtg-galaxy.cfg | |
5 | |
6 # Temporary storage for STDERR | |
7 TMP_STDERR=$(mktemp) || exit 1 | |
8 | |
9 #echo "$(date) START $@" >>~/galaxy-rtg-wrapper.log | |
10 # Run the program, send STDERR to temporary file | |
11 $rtg "$@" 2> $TMP_STDERR | |
12 | |
13 #check program's exit code | |
14 if (( $? )); then | |
15 #echo "$(date) FAIL $@" >>~/galaxy-rtg-wrapper.log | |
16 #cat $TMP_STDERR >>~/galaxy-rtg-wrapper.log | |
17 #Program failed, send STDERR to real STDERR | |
18 cat $TMP_STDERR >&2 | |
19 rm $TMP_STDERR | |
20 exit 1 | |
21 fi | |
22 #echo "$(date) DONE $@" >>~/galaxy-rtg-wrapper.log | |
23 | |
24 #Program succeeded, delete STDERR file | |
25 rm $TMP_STDERR | |
26 exit 0 |