summarylogtreecommitdiffstats
path: root/evelauncher.sh
diff options
context:
space:
mode:
authorJernuh Zakalwe2018-10-16 21:14:47 +0200
committerJernuh Zakalwe2018-10-16 21:14:47 +0200
commit9f3b4052f0beedcddcbbc4f85bcf9d6b8a2c3b66 (patch)
treebf613a3c9357a43307f55b9af1dbbd6fc0da4ff9 /evelauncher.sh
parent09c5b0109994c4c31a1180a9702766f32a95a21d (diff)
downloadaur-9f3b4052f0beedcddcbbc4f85bcf9d6b8a2c3b66.tar.gz
Added build script for creating distribution independed installer.
File attributes changed to avoid accidentally executing in src directory. Minor fixes.
Diffstat (limited to 'evelauncher.sh')
-rw-r--r--[-rwxr-xr-x]evelauncher.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/evelauncher.sh b/evelauncher.sh
index e34adf9c21a3..89dbbcfa45de 100755..100644
--- a/evelauncher.sh
+++ b/evelauncher.sh
@@ -1,21 +1,23 @@
#!/bin/sh
+set -e
+
launcher_msg() {
- if [ -x "$(which notify-send 2>/dev/null)" ]; then
- notify-send -u low -i eve 'EVE Online Launcher' "$@"
+ if [ -x "$(which notify-send 2>/dev/null)" ] ;then
+ notify-send -i eve 'EVE Online Launcher' "$@"
fi
echo "$(basename $0): $@"
}
check_install() {
- if [ -d "$CONFDIR" ]; then
- if [ -r "$CONFDIR/EVE.conf" ]; then
+ if [ -d "$CONFDIR" ] ;then
+ if [ -r "$CONFDIR/EVE.conf" ] ;then
SHAREDIR=$(grep SharedCacheFolder $CONFDIR/EVE.conf | cut -d= -f2)
fi
fi
SHAREDIR=${SHAREDIR:-$HOME/.eve/}
[ ! -d "$SHAREDIR" ] && SHAREDIR=""
- if [ "x$SHAREDIR" != "x$EVEDIR/SharedCache/" ]; then
+ if [ "x$SHAREDIR" != "x$EVEDIR/SharedCache/" ] ;then
launcher_msg "Please wait, preparing environment in $EVEDIR"
mkdir -p $CONFDIR
echo "[General]" >$CONFDIR/EVE.conf
@@ -24,7 +26,7 @@ check_install() {
echo "CustomWinePath=$WINEPATH/wine" >>$CONFDIR/EVE.conf
mkdir -p $EVEDIR/SharedCache
tar xf $SETUPDIR/lib/launcher-$ELVER.tar.xz -C $EVEDIR
- if [ -d "$SHAREDIR/ResFiles/" ]; then
+ if [ -d "$SHAREDIR/ResFiles/" ] ;then
mv $SHAREDIR/ResFiles/ $EVEDIR/SharedCache/
mv $SHAREDIR/*.txt $EVEDIR/SharedCache/
rm -rf $SHAREDIR
@@ -33,7 +35,7 @@ check_install() {
}
check_steam() {
- if [ ! -r "$LAUNCHER/steam_appid.txt" -a -x "$(which steam 2>/dev/null)" ]; then
+ if [ ! -r "$LAUNCHER/steam_appid.txt" -a -x "$(which steam 2>/dev/null)" ] ;then
echo "8500" >$LAUNCHER/steam_appid.txt
fi
}
@@ -41,7 +43,7 @@ check_steam() {
check_wine() {
EVECONF=$CONFDIR/EVE.conf
UCW=$(grep UseCustomWine $EVECONF | cut -d= -f2)
- if [ "x$UCW" = "xtrue" ]; then
+ if [ "x$UCW" = "xtrue" ] ;then
WINEPATH=$(grep CustomWinePath $EVECONF | cut -d= -f2)
WINEPATH=${WINEPATH%/*}
else
@@ -49,9 +51,9 @@ check_wine() {
exit 1
fi
WINEDATE=$(ls -l --time-style=+%s $WINEPATH/wineserver | cut -d' ' -f6)
- INSTWINE=$(cat $EVEDIR/SharedCache/wineenv/.update-timestamp 2>/dev/null)
- if [ "x$WINEDATE" != "x$INSTWINE" ]; then
- if [ -x "$WINEPATH/wine" ]; then
+ INSTWINE=$(cat $EVEDIR/SharedCache/wineenv/.update-timestamp 2>/dev/null) || true
+ if [ "x$WINEDATE" != "x$INSTWINE" ] ;then
+ if [ -x "$WINEPATH/wine" ] ;then
WINEPREFIX=$EVEDIR/SharedCache/wineenv
launcher_msg "Preparing/Updating wine in $WINEPREFIX"
env WINEARCH=win32 \