diff --git a/setup/appimage_launcher.sh b/setup/appimage_launcher.sh new file mode 100755 index 00000000..fc0aa9e9 --- /dev/null +++ b/setup/appimage_launcher.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Please provide the path to the novelWriter.AppImage file as an argument" + exit 1 +fi + +if [ ! -e "$1" ]; then + echo "File not found" + exit 1 +fi + +IMGPATH="$(readlink -m "$1")" +echo "AppImage: $IMGPATH" + +ICONPATH="$(dirname "$IMGPATH")/novelWriter.png" + +if [ ! -e "$ICONPATH" ]; then + echo "Downloading icon" + wget https://raw.githubusercontent.com/vkbo/novelWriter/main/setup/data/hicolor/256x256/apps/novelwriter.png -O "$ICONPATH" +fi + +cat > $HOME/.local/share/applications/novelWriter.desktop <