summaryrefslogtreecommitdiff
path: root/indra/newview/linux_tools/refresh_desktop_app_entry.sh
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-08-21 21:52:21 +0000
committerAdam Moss <moss@lindenlab.com>2009-08-21 21:52:21 +0000
commitc3cbd049859c058526ae9a07a5cbfa7e51085943 (patch)
tree80f74a033a2f56f465cd4a67fa3e11a00bc18248 /indra/newview/linux_tools/refresh_desktop_app_entry.sh
parent87be6648d50efc55785e2298a9ed6ec0546da564 (diff)
svn merge -r130238:130240 svn+ssh://svn.lindenlab.com/svn/linden/branches/linux-updater-6
QAR-1771 Linux Viewer Autoupdater + XUI-parse refactoring
Diffstat (limited to 'indra/newview/linux_tools/refresh_desktop_app_entry.sh')
-rwxr-xr-xindra/newview/linux_tools/refresh_desktop_app_entry.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/linux_tools/refresh_desktop_app_entry.sh b/indra/newview/linux_tools/refresh_desktop_app_entry.sh
new file mode 100755
index 0000000000..d2b2a732d5
--- /dev/null
+++ b/indra/newview/linux_tools/refresh_desktop_app_entry.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+SCRIPTSRC=`readlink -f "$0" || echo "$0"`
+RUN_PATH=`dirname "${SCRIPTSRC}" || echo .`
+
+install_prefix=${RUN_PATH}/..
+
+function install_desktop_entry()
+{
+ local installation_prefix="$1"
+ local desktop_entries_dir="$2"
+
+ local desktop_entry="\
+[Desktop Entry]\n\
+Name=Second Life\n\
+Comment=Client for the On-line Virtual World, Second Life\n\
+Exec=${installation_prefix}/secondlife\n\
+Icon=${installation_prefix}/secondlife_icon.png\n\
+Terminal=false\n\
+Type=Application\n\
+Categories=Application;Network;\n\
+StartupNotify=true\n\
+X-Desktop-File-Install-Version=3.0"
+
+ echo " - Installing menu entries in ${desktop_entries_dir}"
+ mkdir -vp "${desktop_entries_dir}"
+ echo -e $desktop_entry > "${desktop_entries_dir}/secondlife-viewer.desktop" || "Failed to install application menu!"
+}
+
+if [ "$UID" == "0" ]; then
+ # system-wide
+ install_desktop_entry "$install_prefix" /usr/local/share/applications
+else
+ # user-specific
+ install_desktop_entry "$install_prefix" "$HOME/.local/share/applications"
+fi