#!/bin/bash echo ------------------------------------- echo installing... echo ------------------------------------- #current path SCRIPT=$(realpath $0) SCRIPT_FOLDER=$(dirname $SCRIPT) echo 'current script path is' $SCRIPT_FOLDER #get desktop folder DESKTOP_FOLDER=$(xdg-user-dir DESKTOP) echo 'desktop folder is' $DESKTOP_FOLDER #get os arch MACHINE_TYPE=$(uname -m) echo 'architecture is' $MACHINE_TYPE FILE=$SCRIPT_FOLDER/alexandria_0.13.1_amd64.AppImage if [ -f "$FILE" ]; then chmod +x $SCRIPT_FOLDER/alexandria_0.13.1_amd64.AppImage echo create desktop shotcut cat > $DESKTOP_FOLDER/alexandria.desktop <<- EOM [Desktop Entry] Version=1.0 Name=Alexandria Comment=a minimalistic eBook reader Exec=$SCRIPT_FOLDER/alexandria_0.13.1_amd64.AppImage Path=$SCRIPT_FOLDER/ Icon=$SCRIPT_FOLDER/alexandria.png Terminal=false Type=Application Categories=Office; EOM chmod +x $DESKTOP_FOLDER/alexandria.desktop fi