Move .desktop file path to new env var to avoid duplicates
authorMichael Schuster <michael@schuster.ms>
Sat, 16 Nov 2019 20:34:13 +0000 (21:34 +0100)
committerMichael Schuster <michael@schuster.ms>
Sat, 16 Nov 2019 20:34:13 +0000 (21:34 +0100)
Signed-off-by: Michael Schuster <michael@schuster.ms>
admin/linux/build-appimage.sh

index 3c5b26c97ae1b5bc6d31cd166113ef82c349aebd..7ea22bf523bb07a129404f5e5f5f3151cce5c31f 100755 (executable)
@@ -69,7 +69,8 @@ rm -rf ./usr/share/nemo-python/
 mv ./etc/Nextcloud/sync-exclude.lst ./usr/bin/
 rm -rf ./etc
 
-sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' usr/share/applications/${LINUX_APPLICATION_ID}.desktop # Bug in desktop file?
+DESKTOP_FILE=/app/usr/share/applications/${LINUX_APPLICATION_ID}.desktop
+sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' ${DESKTOP_FILE} # Bug in desktop file?
 cp ./usr/share/icons/hicolor/512x512/apps/Nextcloud.png . # Workaround for linuxeployqt bug, FIXME
 
 
@@ -90,13 +91,13 @@ chmod a+x linuxdeployqt*.AppImage
 rm ./linuxdeployqt-continuous-x86_64.AppImage
 unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
 export LD_LIBRARY_PATH=/app/usr/lib/
-./squashfs-root/AppRun /app/usr/share/applications/${LINUX_APPLICATION_ID}.desktop -bundle-non-qt-libs
+./squashfs-root/AppRun ${DESKTOP_FILE} -bundle-non-qt-libs
 
 # Set origin
 ./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/libnextcloudsync.so.0
 
 # Build AppImage
-./squashfs-root/AppRun /app/usr/share/applications/${LINUX_APPLICATION_ID}.desktop -appimage
+./squashfs-root/AppRun ${DESKTOP_FILE} -appimage
 
 mv Nextcloud*.AppImage Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage