#!/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/kDrive-3.5.8.20240227-amd64.AppImage if [ -f "$FILE" ]; then chmod +x $SCRIPT_FOLDER/kDrive-3.5.8.20240227-amd64.AppImage echo create desktop shotcut cat > $DESKTOP_FOLDER/kDrive.desktop <<- EOM [Desktop Entry] Version=1.0 Name=kDrive Comment=Install infomaniak kdrive Exec=$SCRIPT_FOLDER/kDrive-3.5.8.20240227-amd64.AppImage Path=$SCRIPT_FOLDER/ Icon=/usr/share/icons/ufficiozero/kdrive.webp Terminal=false Type=Application Categories=PackageManager;GTK;System;Application;X-MandrivaLinux-System-Configuration-Packaging; EOM chmod +x $DESKTOP_FOLDER/kDrive.desktop fi