File: gpsprune

package info (click to toggle)
gpsprune 19.2-1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 4,516 kB
  • sloc: java: 42,704; sh: 25; makefile: 24; python: 15
file content (16 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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