Fix regression from bbbb76d4
Code tested against BSD xargs, fails with GNU implementation.
diff --git a/jenkins.sh b/jenkins.sh
index 9e076cb..6cbe125 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -12,12 +12,12 @@
java_opts_array=()
while IFS= read -r -d '' item; do
java_opts_array+=( "$item" )
- done < <(xargs printf '%s\0' <<<"$JAVA_OPTS")
+ done < <([[ $JAVA_OPTS ]] && xargs printf '%s\0' <<<"$JAVA_OPTS")
jenkins_opts_array=( )
while IFS= read -r -d '' item; do
jenkins_opts_array+=( "$item" )
- done < <(xargs printf '%s\0' <<<"$JENKINS_OPTS")
+ done < <([[ $JENKINS_OPTS ]] && xargs printf '%s\0' <<<"$JENKINS_OPTS")
exec java "${java_opts_array[@]}" -jar /usr/share/jenkins/jenkins.war "${jenkins_opts_array[@]}" "$@"
fi