Created
February 3, 2022 18:08
-
-
Save J-Curragh/08716aeaf73ad7a90382c1ba78276585 to your computer and use it in GitHub Desktop.
freedesktop.org desktop entry install script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Validating the desktop entry..." | |
desktop-file-validate $1 | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
echo "The desktop entry has been validated." | |
echo "Installing desktop entry $(echo $1) to ~/.local/share/applications" | |
desktop-file-install --dir=$HOME/.local/share/applications $1 | |
echo "Updating the desktop database..." | |
update-desktop-database ~/.local/share/applications | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
echo "The desktop database has been updated." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment