Skip to content

Commit

Permalink
Update shell wrappers: gatk-framework, picard, snpeff (#4929)
Browse files Browse the repository at this point in the history
The shell wrapper scripts had inconsistent ways of checking for
JAVA_HOME which were incorrect on gatk-framework and snpeff and would
pick up a java installed in `/bin/java` even if unset.
bcbio/bcbio-nextgen#1968
  • Loading branch information
chapmanb authored Jun 9, 2017
1 parent 2a223d2 commit b726965
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion recipes/gatk-framework/gatk-framework
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV_PREFIX="$(dirname $(dirname $DIR))"
# Use Java installed with Anaconda to ensure correct version
java="$ENV_PREFIX/bin/java"

if [ -z "${JAVA_HOME:=}" ]; then
if [ -n "${JAVA_HOME:=}" ]; then
if [ -e "$JAVA_HOME/bin/java" ]; then
java="$JAVA_HOME/bin/java"
fi
Expand Down
2 changes: 1 addition & 1 deletion recipes/gatk-framework/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package:
version: '3.6.24'

build:
number: 3
number: 4
skip: False

source:
Expand Down
6 changes: 3 additions & 3 deletions recipes/picard/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ source:
md5: 0449279a6a89830917e8bcef3a976ef7

build:
number: 0
number: 1
skip: False

requirements:
run:
- java-jdk >=8
- openjdk >=8
- python

test:
commands:
- "picard 2>&1 | grep 'USAGE: PicardCommandLine'"
- "picard 2>&1 | grep USAGE:"

about:
home: "http://broadinstitute.github.io/picard/"
Expand Down
2 changes: 1 addition & 1 deletion recipes/picard/picard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV_PREFIX="$(dirname $(dirname $DIR))"
java="$ENV_PREFIX/bin/java"

# if JAVA_HOME is set (non-empty), use it. Otherwise keep "java"
if [ ! -z "${JAVA_HOME:=}" ]; then
if [ -n "${JAVA_HOME:=}" ]; then
if [ -e "$JAVA_HOME/bin/java" ]; then
java="$JAVA_HOME/bin/java"
fi
Expand Down
2 changes: 1 addition & 1 deletion recipes/snpeff/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package:
version: {{ version }}

build:
number: 0
number: 1
skip: False

source:
Expand Down
2 changes: 1 addition & 1 deletion recipes/snpeff/snpeff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ JAR_DIR=$DIR

java=java

if [ -z "${JAVA_HOME:=}" ]; then
if [ -n "${JAVA_HOME:=}" ]; then
if [ -e "$JAVA_HOME/bin/java" ]; then
java="$JAVA_HOME/bin/java"
fi
Expand Down

0 comments on commit b726965

Please sign in to comment.