Fixed a couple bugs in the desktop code, I think.
This commit is contained in:
parent
55f15b234c
commit
396a9b6e55
@ -115,7 +115,7 @@ fi
|
||||
|
||||
# Create desktop launcher file
|
||||
desktop_launcher() {
|
||||
local desktopFile="${TMPDIR:-/tmp}/audiogame-manager.desktop"
|
||||
local desktopFile="${HOME}/audiogame-manager.desktop"
|
||||
if [[ -e "${desktopFile}" ]]; then
|
||||
echo "the file ${desktopFile} exists. Cannot create the launcher."
|
||||
exit 1
|
||||
@ -139,11 +139,11 @@ desktop_launcher() {
|
||||
'StartupNotify=false'
|
||||
'Keywords=Games'
|
||||
'Version=1.0')
|
||||
echo "${dotDesktop[@]}" > "${desktopFile}"
|
||||
xdg-desktop-icon install "${desktopFile}" 2> /dev/null
|
||||
if [[ -d ~/Desktop ]]; then
|
||||
cp -n "${desktopFile}" ~/Desktop && chmod 755 ~/Desktop/"${desktopFile##*/}"
|
||||
fi
|
||||
for i in "${dotDesktop[@]}" ; do
|
||||
echo "$i" >> "${desktopFile}"
|
||||
done
|
||||
desktop-file-install --dir "${HOME}/.local/share/applications" -m 755 "${desktopFile}"
|
||||
xdg-desktop-icon install ~/.local/share/applications/audiogame-manager.desktop
|
||||
rm "${desktopFile}"
|
||||
exit 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user