summarylogtreecommitdiffstats
path: root/setup.sh.in
diff options
context:
space:
mode:
authorJernuh Zakalwe2018-10-19 17:20:42 +0200
committerJernuh Zakalwe2018-10-19 17:20:42 +0200
commitf2a93b8c75b98b0b939335e894c854b19b5fd30b (patch)
treefca9e01863c085a658e542056678e2f670d6719f /setup.sh.in
parent9b1e3eb0d28469449f59376a3f365dc72910668b (diff)
downloadaur-f2a93b8c75b98b0b939335e894c854b19b5fd30b.tar.gz
Replaced evewinecfg and everegedit with symlinks to evewine which execute these commands now.
Changes on build_installer.sh script to handle symlinks from evewinecfg and everegedit. Handle symlinks from everegedit and evewinecfg in setup.sh.in and PKGBUILD too.
Diffstat (limited to 'setup.sh.in')
-rw-r--r--setup.sh.in55
1 files changed, 38 insertions, 17 deletions
diff --git a/setup.sh.in b/setup.sh.in
index f4fb761ec26a..c08fff1eddbb 100644
--- a/setup.sh.in
+++ b/setup.sh.in
@@ -20,13 +20,24 @@ bootstrap_install() {
exit 0
fi
install -dv "${target}/bin/"
- install -d "/usr/bin/"
- install -d "/usr/share/applications/"
- for cmd in evelauncher.sh everegedit evewine evewinecfg evewinetricks ;do
- install "./$cmd" "${target}/bin/"
- ln -s "${target}/bin/$cmd" "/usr/bin/$cmd"
+ install -d "${prefix}/bin/"
+ install -d "${prefix}/share/applications/"
+ for cmd in evelauncher.sh evewine evewinetricks everegedit evewinecfg ;do
+ if [ -f "./$cmd" ] ;then
+ install "./$cmd" "${target}/bin/"
+ else
+ ln -sf evewine "${target}/bin/${cmd}"
+ fi
+ ln -s "${target}/bin/$cmd" "${prefix}/bin/$cmd"
if [ ! "$cmd" = "evewine" ] ;then
- install -m 0644 "./${cmd%.*}.desktop" "/usr/share/applications/"
+#-- testing only
+# oexec=$(grep Exec= ./${cmd%.*}.desktop)
+# sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop
+#--
+ install -m 0644 "./${cmd%.*}.desktop" "${prefix}/share/applications/"
+#-- testing only
+# sed -i s,Exec=$prefix/bin/$cmd,$oexec, ./${cmd%.*}.desktop
+#--
fi
done
install -dv "${target}/lib/"
@@ -35,34 +46,36 @@ bootstrap_install() {
done
install -m 0644 "./evelauncher-${elver}.tar.gz" "${target}/lib"
for icons in $(find . -type f -name '*.png') ;do
- install -m 0644 "$icons" "/usr/share/$icons"
+ install -D -m 0644 "$icons" "${prefix}/share/${icons#*/}"
done
if [ -x $(which gtk-update-icon-cache) ] ;then
- gtk-update-icon-cache -f "/usr/share/icons/hicolor" 2>/dev/null && \
- chmod 0644 "/usr/share/icons/hicolor/icon-theme.cache"
+ gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null
+ [ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] && \
+ chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache"
fi
}
bootstrap_remove() {
for icons in $(find . -type f -name '*.png') ;do
- rm -f "/usr/share/$icons"
+ rm -f "${prefix}/share/${icons#*/}"
done
if [ -x $(which gtk-update-icon-cache) ] ;then
- gtk-update-icon-cache -f "/usr/share/icons/hicolor" 2>/dev/null && \
- chmod 0644 "/usr/share/icons/hicolor/icon-theme.cache"
+ gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null
+ [ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] && \
+ chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache"
fi
rm -rfv "${target}/lib/"
- for cmd in evelauncher.sh eveoverrides everegedit \
- evewine evewinecfg evewinetricks ;do
- rm -fv "/usr/bin/$cmd"
+ for cmd in evelauncher.sh everegedit evewine evewinecfg evewinetricks ;do
+ rm -fv "${prefix}/bin/$cmd"
if [ ! "$cmd" = "evewine" ] ;then
- rm -f "/usr/share/applications/${cmd%.*}.desktop"
+ rm -f "${prefix}/share/applications/${cmd%.*}.desktop"
fi
done
rm -rfv "${target}"
}
target="/opt/evesetup"
+prefix="/usr"
key=""
qtver="5.11"
elver="1385477"
@@ -72,17 +85,25 @@ if [ $(id -u) -ne 0 ] ;then
printf "\nExiting.\n\n"
exit 0
fi
+
if [ -d "${target}/bin/" ] ;then
printf "\n"
read -p 'Remove EVE Online Launcher Setup? (Y/n) ' key
[ ! "x$(echo $key | tr [:upper:] [:lower:])" = "xn" ] && \
bootstrap_remove
else
+#-- testing only
+# otarget=$(grep ^SETUPDIR= ./evelauncher.sh)
+# sed -i s,$otarget,SETUPDIR=\"$target\", ./evelauncher.sh
+#--
printf "\n"
read -p 'Install EVE Online Launcher Setup? (Y/n) ' key
[ ! "x$(echo $key | tr [:upper:] [:lower:])" = "xn" ] && \
bootstrap_install && \
printf "\nYou can now start EVE Online Launcher and his " && \
- echo "Tools from your Application menu."
+ echo "Tools from your Application menu."
+#-- testing only
+# sed -i s,SETUPDIR=\"$target\",$otarget, ./evelauncher.sh
+#--
fi
printf "\nDone.\n\n"