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