update from Han
This commit is contained in:
parent
537d41c96e
commit
5e521b66b7
1 changed files with 34 additions and 21 deletions
|
@ -43,7 +43,9 @@ Options:
|
||||||
|
|
||||||
only for packagers:
|
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
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -65,7 +67,7 @@ Henrik Kinnunnen: Project leader.
|
||||||
Han Boetes: Packaging, debugging and scripts.
|
Han Boetes: Packaging, debugging and scripts.
|
||||||
Jeramy B. Smith: Packaging assistance, gnome and kde menu system.
|
Jeramy B. Smith: Packaging assistance, gnome and kde menu system.
|
||||||
Xyrnix: Mysterious guest developer who made find_it module.
|
Xyrnix: Mysterious guest developer who made find_it module.
|
||||||
filipe: Italian locales and find_term module.
|
felipe: Italian locales and find_term module.
|
||||||
EOF
|
EOF
|
||||||
echo -e `whoami`": Innocent bystander.\n"
|
echo -e `whoami`": Innocent bystander.\n"
|
||||||
}
|
}
|
||||||
|
@ -110,13 +112,15 @@ menu_entry_dir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get options.
|
# 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
|
case "${COMMAND_LINE_ARGUMENT}" in
|
||||||
k) KDEMENU=yes ;;
|
k) KDEMENU=yes ;;
|
||||||
g) GNOMEMENU=yes ;;
|
g) GNOMEMENU=yes ;;
|
||||||
t) MY_TERM=${OPTARG};;
|
t) MY_TERM=${OPTARG};;
|
||||||
o) FILENAME=${OPTARG} ;;
|
o) FILENAME=${OPTARG} ;;
|
||||||
p) PKGDATADIR=${OPTARG} ;;
|
p) PKGDATADIR=${OPTARG} ;;
|
||||||
|
n) GPKGDATADIR=${OPTARG} ;;
|
||||||
|
q) KPKGDATADIR=${OPTARG} ;;
|
||||||
m) MENUTITLE=${OPTARG} ;;
|
m) MENUTITLE=${OPTARG} ;;
|
||||||
h) display_usage ; exit 0 ;;
|
h) display_usage ; exit 0 ;;
|
||||||
a) display_authors ; exit 0 ;;
|
a) display_authors ; exit 0 ;;
|
||||||
|
@ -127,7 +131,7 @@ done
|
||||||
|
|
||||||
# Set Defaults
|
# Set Defaults
|
||||||
|
|
||||||
# menufile name and make a backup
|
# menufile name
|
||||||
if [ -z ${FILENAME} ]; then
|
if [ -z ${FILENAME} ]; then
|
||||||
FILENAME=${HOME}/.fluxbox/menu
|
FILENAME=${HOME}/.fluxbox/menu
|
||||||
fi
|
fi
|
||||||
|
@ -138,17 +142,26 @@ if ! touch ${FILENAME}; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${FILENAME} ]; then
|
# backup menu
|
||||||
if [ -w ${FILENAME} ]; then
|
if [ -w ${FILENAME} ]; then
|
||||||
cp -f ${FILENAME} ${FILENAME}.bak
|
mv ${FILENAME} ${FILENAME}.bak
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#packagedatadir
|
#packagedatadir
|
||||||
if [ -z "${PKGDATADIR}" ]; then
|
if [ ! -d "${PKGDATADIR}" ]; then
|
||||||
PKGDATADIR=/usr/share
|
PKGDATADIR=/usr/share
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#gnome packagedatadir
|
||||||
|
if [ ! -d "${GPKGDATADIR}" ]; then
|
||||||
|
GPKGDATADIR=${PKGDATADIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#kde packagedatadir
|
||||||
|
if [ ! -d "${KPKGDATADIR}" ]; then
|
||||||
|
KPKGDATADIR=${PKGDATADIR}
|
||||||
|
fi
|
||||||
|
|
||||||
# menutitle
|
# menutitle
|
||||||
if [ -z "${MENUTITLE}" ]; then
|
if [ -z "${MENUTITLE}" ]; then
|
||||||
MENUTITLE="Fluxbox"
|
MENUTITLE="Fluxbox"
|
||||||
|
@ -464,12 +477,12 @@ append_submenu ${XUTILSMENU}
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
# gnome menu
|
# gnome menu
|
||||||
if [ -d ${PKGDATADIR}/gnome/apps -a "${GNOMEMENU}" ]; then
|
if [ -d ${GPKGDATADIR}/gnome/apps -a "${GNOMEMENU}" ]; then
|
||||||
append_submenu ${GNOMEMENUTEXT}
|
append_submenu ${GNOMEMENUTEXT}
|
||||||
for a in `ls ${PKGDATADIR}/gnome/apps`; do
|
for a in `ls ${GPKGDATADIR}/gnome/apps`; do
|
||||||
if [ -d ${PKGDATADIR}/gnome/apps/"${a}" ] ; then
|
if [ -d ${GPKGDATADIR}/gnome/apps/"${a}" ] ; then
|
||||||
append_submenu "${a}"
|
append_submenu "${a}"
|
||||||
menu_entry_dir "${PKGDATADIR}/gnome/apps/"${a}""
|
menu_entry_dir "${GPKGDATADIR}/gnome/apps/"${a}""
|
||||||
menu_entry_dircheck "/etc/X11/applnk/"${a}""
|
menu_entry_dircheck "/etc/X11/applnk/"${a}""
|
||||||
append_menu_end
|
append_menu_end
|
||||||
fi
|
fi
|
||||||
|
@ -478,23 +491,23 @@ if [ -d ${PKGDATADIR}/gnome/apps -a "${GNOMEMENU}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# kde submenu
|
# kde submenu
|
||||||
if [ -d ${PKGDATADIR}/applnk/ -a "${KDEMENU}" ]; then
|
if [ -d ${KPKGDATADIR}/applnk/ -a "${KDEMENU}" ]; then
|
||||||
append_submenu ${KDEMENUTEXT}
|
append_submenu ${KDEMENUTEXT}
|
||||||
for a in `ls ${PKGDATADIR}/applnk/`; do
|
for a in `ls ${KPKGDATADIR}/applnk/`; do
|
||||||
if [ -d ${PKGDATADIR}/applnk/"${a}" ]; then
|
if [ -d ${KPKGDATADIR}/applnk/"${a}" ]; then
|
||||||
append_submenu "${a}"
|
append_submenu "${a}"
|
||||||
for x in `ls ${PKGDATADIR}/applnk/"${a}"`; do
|
for x in `ls ${KPKGDATADIR}/applnk/"${a}"`; do
|
||||||
if [ -d ${PKGDATADIR}/applnk/"${a}"/"${x}" ]; then
|
if [ -d ${KPKGDATADIR}/applnk/"${a}"/"${x}" ]; then
|
||||||
append_submenu "${x}"
|
append_submenu "${x}"
|
||||||
menu_entry_dir ${PKGDATADIR}/applnk/"${a}"/"${x}"
|
menu_entry_dir ${KPKGDATADIR}/applnk/"${a}"/"${x}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
menu_entry_dir ${PKGDATADIR}/applnk/"${a}"
|
menu_entry_dir ${KPKGDATADIR}/applnk/"${a}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
menu_entry_dir ${PKGDATADIR}/applnk/
|
menu_entry_dir ${KPKGDATADIR}/applnk/
|
||||||
append_menu_end
|
append_menu_end
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue