forked from zlatinb/muwire-pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
muwire-mac.sh
executable file
·33 lines (29 loc) · 1.06 KB
/
muwire-mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/.." >/dev/null
APP_HOME="`pwd -P`"
RESDIR=$APP_HOME/Resources
cd "$SAVED" >/dev/null
CONFDIR="$HOME/Library/Application Support/MuWire"
mkdir -p "${CONFDIR}"
cp -R $RESDIR/certificates "$CONFDIR"
mkdir -p "${CONFDIR}/geoip"
cp $RESDIR/countries.txt "${CONFDIR}/geoip"
cp $RESDIR/continents.txt "${CONFDIR}/geoip"
cp $RESDIR/GeoLite2-Country.mmdb "${CONFDIR}/geoip"
#need to launch from outside the appbundle because of jbigi
cd "${CONFDIR}"
"${RESDIR}"/jre/bin/java -Xmx512m -Xdock:name=MuWire -Xdock:icon="${RESDIR}"/MuWire-128x128.png -cp "$RESDIR/jbigi.jar:$RESDIR/MuWire.jar:$RESDIR/unnamed.jar" -DembeddedRouter=true -DupdateType=mac -Djava.util.logging.config.file=0_logging.properties com.muwire.gui.Launcher