freezer/linux/install-desktop-file.sh
Pato05 2a5a51e43f
fix player in just_audio_media_kit +
fix lyrics
add right click action to AlbumCard
add desktop file script for linux
automated tarball creation for linux
don't preload old queue
2024-02-14 22:39:35 +01:00

35 lines
872 B
Bash

#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ -z "$HOME" ]; then
echo "HOME variable not set. Aborting..."
exit 1
fi
EXECUTABLE="${SCRIPT_DIR}/freezer"
ICON="${SCRIPT_DIR}/data/flutter_assets/assets/icon.ico"
if [ ! -x "$EXECUTABLE" ] || [ ! -f "$ICON" ]; then
echo "Icon or executable not found. Aborting..."
exit 1
fi
APPLICATIONS_DIR="$HOME/.local/share/applications"
if [ ! -w "$APPLICATIONS_DIR" ]; then
echo "Cannot write to $APPLICATIONS_DIR. Aborting..."
exit 1
fi
cat <<EOF
[Desktop Entry]
Type=Application
Name=freezer
GenericName=No DRM Deezer client
Comment=No DRM Deezer client to listen and download your songs
Exec=$EXECUTABLE
Icon=$ICON
Categories=Audio;Music;Player;AudioVideo;
Keywords=Music;Player;Streaming;Online;
Terminal=false
EOF > "$APPLICATIONS_DIR/freezer.desktop"