summarylogtreecommitdiffstats
path: root/setup.sh.in
diff options
context:
space:
mode:
authorJernuh Zakalwe2019-07-25 18:35:35 +0200
committerJernuh Zakalwe2019-07-25 18:35:35 +0200
commitba9b939a34db95d84e5b791d246e8668e9e08514 (patch)
treee3700d206b6f48e79d15ea4f394c93e57060c6e7 /setup.sh.in
parented4e328251dd6987b3fdaa8521602cca6e507a71 (diff)
downloadaur-ba9b939a34db95d84e5b791d246e8668e9e08514.tar.gz
Many changes under the hood to make the installation more flexible.
Shared library and some icons renamed to avoid name conflicts. Icon-cache refresh removed, the package manager should do this.
Diffstat (limited to 'setup.sh.in')
-rw-r--r--setup.sh.in74
1 files changed, 28 insertions, 46 deletions
diff --git a/setup.sh.in b/setup.sh.in
index 8a9efddae584..909fb2c3a38c 100644
--- a/setup.sh.in
+++ b/setup.sh.in
@@ -3,60 +3,47 @@
set -e
bootstrap_install() {
- install -dv "${target}/bin/"
- install -d "${prefix}/bin/"
- install -d "${prefix}/share/applications/"
+ install -dv "$destdir"
+ install -dv "$bindir"
+ install -dv "$libdir"
+ install -d "$prefix/bin/"
+ install -d "$prefix/share/applications/"
+ for eta in $(ls ./eve-transl${qtver}-??.tar.gz) ;do
+ install -m 0644 "$eta" "$libdir"
+ done
+ install -m 0644 "./evesetup.shlib" "$libdir"
+ install -m 0644 "./evelauncher-${elver}.tar.gz" "$libdir"
+ sed -i s,./eve-transl,$libdir/eve-transl, ./evelauncher.sh
for cmd in evelauncher.sh evewine evewinetricks everegedit evewinecfg evebackup ;do
if [ -f "./$cmd" ] ;then
- install "./$cmd" "${target}/bin/"
+ sed -i s,./evesetup.shlib,$libdir/evesetup.shlib, ./$cmd
+ install "./$cmd" "$bindir/"
else
- ln -sf evewine "${target}/bin/${cmd}"
+ ln -sf evewine "$bindir/$cmd"
fi
- ln -s "${target}/bin/$cmd" "${prefix}/bin/$cmd"
+ [ "$bindir" != "$prefix/bin" ] && ln -s "$bindir/$cmd" "$prefix/bin/$cmd"
if [ ! "$cmd" = "evewine" ] ;then
-#-- 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
-#--
+ oexec=$(grep Exec= ./${cmd%.*}.desktop)
+ sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop
+ install -m 0644 "./${cmd%.*}.desktop" "$prefix/share/applications/"
fi
done
- install -dv "${target}/lib/"
- for eta in $(ls ./eve-transl${qtver}-??.tar.gz) ;do
- install -m 0644 "$eta" "${target}/lib"
- done
- install -m 0644 "./evelauncher.shlib" "${target}/lib"
- install -m 0644 "./evelauncher-${elver}.tar.gz" "${target}/lib"
for icons in $(find . -type f -name '*.png') ;do
- install -D -m 0644 "$icons" "${prefix}/share/${icons#*/}"
+ install -D -m 0644 "$icons" "$prefix/share/${icons#*/}"
done
- if [ -x $(which gtk-update-icon-cache) ] ;then
- 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 "${prefix}/share/${icons#*/}"
+ rm -f "$prefix/share/${icons#*/}"
done
- if [ -x $(which gtk-update-icon-cache) ] ;then
- 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 everegedit evewine evewinecfg evewinetricks evebackup ;do
- rm -fv "${prefix}/bin/$cmd"
+ rm -fv "$prefix/bin/$cmd"
if [ ! "$cmd" = "evewine" ] ;then
- rm -f "${prefix}/share/applications/${cmd%.*}.desktop"
+ rm -f "$prefix/share/applications/${cmd%.*}.desktop"
fi
done
- rm -rfv "${target}"
+ rm -rfv "$destdir"
}
build_lib() {
@@ -130,13 +117,15 @@ check_req() {
fi
}
-target="/opt/evesetup"
prefix="/usr"
-key=""
+destdir="/opt/evesetup"
+bindir="$destdir/bin"
+libdir="$destdir/lib"
qtver="5.11"
elver=""
elcsum=""
rcsum=""
+key=""
if [ $(id -u) -ne 0 ] ;then
printf "\nEVE Online Launcher Setup need root permissions."
@@ -144,16 +133,12 @@ if [ $(id -u) -ne 0 ] ;then
exit 0
fi
-if [ -d "${target}/bin/" ] ;then
+if [ -d "$destdir" ] ;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 | tr -d \" | cut -d= -f2)
-#- sed -i s,$otarget,$target, ./evelauncher.sh ./evewine ./evewinetricks
-#--
printf "\n"
read -p 'Install EVE Online Launcher Setup? (Y/n) ' key
[ ! "x$(echo $key | tr [:upper:] [:lower:])" = "xn" ] && \
@@ -163,8 +148,5 @@ else
bootstrap_install && \
printf "\nYou can now start EVE Online Launcher and his " && \
echo "Tools from your Application menu."
-#-- testing only
-#- sed -i s,$target,$otarget, ./evelauncher.sh ./evewine ./evewinetricks
-#--
fi
printf "\nDone.\n\n"