aboutsummaryrefslogtreecommitdiffstats
path: root/menu/update-menus
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2006-05-04 16:19:04 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2006-05-04 16:19:04 +0000
commit1b23b615b3b37a3b8526e282e6ffec76dbd5d1e5 (patch)
treec3ddce9beac8f4fe66fa82df97be5ac6458bbd3c /menu/update-menus
parentd16ff49f63476198ee8364e66794d0c38c551701 (diff)
downloadcommon-data-1b23b615b3b37a3b8526e282e6ffec76dbd5d1e5.tar
common-data-1b23b615b3b37a3b8526e282e6ffec76dbd5d1e5.tar.gz
common-data-1b23b615b3b37a3b8526e282e6ffec76dbd5d1e5.tar.bz2
common-data-1b23b615b3b37a3b8526e282e6ffec76dbd5d1e5.tar.xz
common-data-1b23b615b3b37a3b8526e282e6ffec76dbd5d1e5.zip
- Add applications-mdk.menu file for XDG menu system
- Add xdg_menu script from SUSE to support old WM - Don't ship defaultlayout.menu anymore, it is merged into main menu - Fix typo in old menu file
Diffstat (limited to 'menu/update-menus')
-rwxr-xr-xmenu/update-menus40
1 files changed, 40 insertions, 0 deletions
diff --git a/menu/update-menus b/menu/update-menus
new file mode 100755
index 0000000..c03fde5
--- /dev/null
+++ b/menu/update-menus
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+usage() {
+echo "Usage: update-menus [options]"
+echo " -v Be verbose about what is going on."
+echo " -u generate only user menu (useful for root user)"
+echo " -h, --help This message."
+
+exit 0
+}
+
+
+VERBOSE=0
+
+if [ "$UID" == "0" ]; then
+ USER_MENU=0
+else
+ USER_MENU=1
+fi
+
+if [ $# != 0 ]; then
+
+while getopts ":vunh" option
+do
+ case $option in
+ v ) VERBOSE=1 ; RUN_PARTS_ARG="--verbose" ;;
+ u ) USER_MENU=1 ;;
+ h ) usage ;;
+ esac
+done
+fi
+
+export VERBOSE
+export USER_MENU
+
+if [ -d /etc/menu.d ]; then
+ run-parts $RUN_PARTS_ARG /etc/menu.d
+ echo
+fi
+