@@ -43,7 +43,9 @@ -a Display the authors of this script
only for packagers:
- -p Package-datadir; default is /usr/local/share
+ -p Package-datadir; default is /usr/share
+ -n Gnome-datadir; default is Package-datadir
+ -q KDE-datadir; default is Package-datadir
EOF
}
@@ -65,7 +67,7 @@ Henrik Kinnunnen: Project leader.
Han Boetes: Packaging, debugging and scripts.
Jeramy B. Smith: Packaging assistance, gnome and kde menu system.
Xyrnix: Mysterious guest developer who made find_it module.
-filipe: Italian locales and find_term module.
+felipe: Italian locales and find_term module.
EOF
echo -e `whoami`": Innocent bystander.\n"
}
@@ -110,13 +112,15 @@ done
}
# Get options.
-while getopts ":khagt:p:o:m:" COMMAND_LINE_ARGUMENT ; do
+while getopts ":khagt:p:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
k) KDEMENU=yes ;;
g) GNOMEMENU=yes ;;
t) MY_TERM=${OPTARG};;
o) FILENAME=${OPTARG} ;;
p) PKGDATADIR=${OPTARG} ;;
+ n) GPKGDATADIR=${OPTARG} ;;
+ q) KPKGDATADIR=${OPTARG} ;;
m) MENUTITLE=${OPTARG} ;;
h) display_usage ; exit 0 ;;
a) display_authors ; exit 0 ;;
@@ -127,7 +131,7 @@
# Set Defaults
-# menufile name and make a backup
+# menufile name
if [ -z ${FILENAME} ]; then
FILENAME=${HOME}/.fluxbox/menu
fi
append_menu_end
# gnome menu
-if [ -d ${PKGDATADIR}/gnome/apps -a "${GNOMEMENU}" ]; then
+if [ -d ${GPKGDATADIR}/gnome/apps -a "${GNOMEMENU}" ]; then
append_submenu ${GNOMEMENUTEXT}
- for a in `ls ${PKGDATADIR}/gnome/apps`; do
- if [ -d ${PKGDATADIR}/gnome/apps/"${a}" ] ; then
+ for a in `ls ${GPKGDATADIR}/gnome/apps`; do
+ if [ -d ${GPKGDATADIR}/gnome/apps/"${a}" ] ; then
append_submenu "${a}"
- menu_entry_dir "${PKGDATADIR}/gnome/apps/"${a}""
+ menu_entry_dir "${GPKGDATADIR}/gnome/apps/"${a}""
menu_entry_dircheck "/etc/X11/applnk/"${a}""
append_menu_end
fi
@@ -478,23 +491,23 @@ append_menu_end
fi
# kde submenu
-if [ -d ${PKGDATADIR}/applnk/ -a "${KDEMENU}" ]; then
+if [ -d ${KPKGDATADIR}/applnk/ -a "${KDEMENU}" ]; then
append_submenu ${KDEMENUTEXT}
- for a in `ls ${PKGDATADIR}/applnk/`; do
- if [ -d ${PKGDATADIR}/applnk/"${a}" ]; then
+ for a in `ls ${KPKGDATADIR}/applnk/`; do
+ if [ -d ${KPKGDATADIR}/applnk/"${a}" ]; then
append_submenu "${a}"
- for x in `ls ${PKGDATADIR}/applnk/"${a}"`; do
- if [ -d ${PKGDATADIR}/applnk/"${a}"/"${x}" ]; then
+ for x in `ls ${KPKGDATADIR}/applnk/"${a}"`; do
+ if [ -d ${KPKGDATADIR}/applnk/"${a}"/"${x}" ]; then
append_submenu "${x}"
- menu_entry_dir ${PKGDATADIR}/applnk/"${a}"/"${x}"
+ menu_entry_dir ${KPKGDATADIR}/applnk/"${a}"/"${x}"
append_menu_end
fi
done
- menu_entry_dir ${PKGDATADIR}/applnk/"${a}"
+ menu_entry_dir ${KPKGDATADIR}/applnk/"${a}"
append_menu_end
fi
done
- menu_entry_dir ${PKGDATADIR}/applnk/
+ menu_entry_dir ${KPKGDATADIR}/applnk/
append_menu_end
fi