X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=debian%2Fscripts%2Fgpsprune;fp=debian%2Fscripts%2Fgpsprune;h=e2ff7213f32c95c68a1720a93bfee06705ff9c6c;hb=ffffa56964965f8476dd179448e0bd69d2c29bd9;hp=0000000000000000000000000000000000000000;hpb=31952e846818493afeb9dec44a3d8330a687c194;p=GpsPrune.git diff --git a/debian/scripts/gpsprune b/debian/scripts/gpsprune new file mode 100644 index 0000000..e2ff721 --- /dev/null +++ b/debian/scripts/gpsprune @@ -0,0 +1,16 @@ +#!/bin/sh +PRUNEJAR=/usr/share/gpsprune/gpsprune.jar +JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true" + +proxyhost=$(echo $http_proxy | sed -n 's?http[s|]://\([^:/]\+\).*?\1?p') +proxyport=$(echo $http_proxy | sed -n 's?http[s|]://[^:]\+:\([0-9]\+\).*?\1?p') + +if [ -z $proxyport ] ; then + if [ -z $proxyhost ] ; then + java $JAVA_OPTS -jar $PRUNEJAR "$@" + else + java $JAVA_OPTS -Dhttp.proxyHost=$proxyhost -jar $PRUNEJAR "$@" + fi +else + java $JAVA_OPTS -Dhttp.proxyHost=$proxyhost -Dhttp.proxyPort=$proxyport -jar $PRUNEJAR "$@" +fi