aboutsummaryrefslogtreecommitdiffstats
path: root/misc/setup/install-desktop-files.sh
diff options
context:
space:
mode:
Diffstat (limited to 'misc/setup/install-desktop-files.sh')
-rwxr-xr-xmisc/setup/install-desktop-files.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/misc/setup/install-desktop-files.sh b/misc/setup/install-desktop-files.sh
new file mode 100755
index 0000000..5bcb411
--- /dev/null
+++ b/misc/setup/install-desktop-files.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+if ! test -e "$SETUP_INSTALLPATH"/ioquake3.desktop.in; then
+ exit 0
+fi
+xdg_desktop_menu=`which xdg-desktop-menu 2>/dev/null`
+if test "x$xdg_desktop_menu" = x; then
+ xdg_desktop_menu=./xdg-desktop-menu
+fi
+sed -e "s#^Exec=.*#Exec=$SETUP_INSTALLPATH/ioquake3#" \
+ -e "s#^Icon=.*#Icon=$SETUP_INSTALLPATH/quake3.png#" \
+ < $SETUP_INSTALLPATH/ioquake3.desktop.in \
+ > $SETUP_INSTALLPATH/ioquake3.desktop
+$xdg_desktop_menu install --novendor $SETUP_INSTALLPATH/ioquake3.desktop