1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 22:28:02 +01:00

Use wmgenmenu to create WMRootMenu during installation

Instead of using _old_ and hard-coded predefined menus as the
source for the user's WMRootMenu during installation, generate
the menu automatically using wmgenmenu.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
Carlos R. Mafra
2011-08-06 15:49:35 +02:00
parent e95f886e06
commit 8fe18de926

View File

@@ -61,24 +61,6 @@ copy() {
rm -f "$target" rm -f "$target"
if [ "$file" = "WindowMaker" ]; then if [ "$file" = "WindowMaker" ]; then
sed -e "s|~/GNUstep|$GSDIR|g" "$source" > "$target" sed -e "s|~/GNUstep|$GSDIR|g" "$source" > "$target"
elif [ "$file" = "WMRootMenu" ]; then
if [ "$LOCALE" ]; then
if [ -f "$GLOBALDIR/plmenu.$LOCALE" ]; then
source="$GLOBALDIR/plmenu.$LOCALE"
elif [ -f "$GLOBALDIR/plmenu.${LOCALE%.*}" ]; then
source="$GLOBALDIR/plmenu.${LOCALE%.*}"
elif [ -f "$GLOBALDIR/plmenu.${LOCALE%_*}" ]; then
source="$GLOBALDIR/plmenu.${LOCALE%_*}"
elif [ -f "$GLOBALDIR/menu.${LOCALE%_*}" ]; then
source="$GLOBALDIR/menu.${LOCALE%_*}"
else
source="$GLOBALDIR/plmenu"
fi
else
source="$GLOBALDIR/plmenu"
fi
sed -e "s:#wmdatadir#:$GLOBALDIR:g" \
"$source" > "$GSDIR/Defaults/WMRootMenu"
else else
if test "x$GNUSTEP_USER_ROOT" = "x"; then if test "x$GNUSTEP_USER_ROOT" = "x"; then
sed -e "s:#wmdatadir#:$GLOBALDIR:g" \ sed -e "s:#wmdatadir#:$GLOBALDIR:g" \
@@ -91,7 +73,12 @@ copy() {
fi fi
} }
#
# Generate WMRootmenu
#
GenerateMenu() {
wmgenmenu > $GSDIR/Defaults/WMRootMenu
}
echo "Installing WindowMaker $VERSION for current user..." echo "Installing WindowMaker $VERSION for current user..."
@@ -160,6 +147,7 @@ for i in $FILES; do
fi fi
done done
GenerateMenu
if [ ! -d "$GSDIR/Library/Icons/" ]; then if [ ! -d "$GSDIR/Library/Icons/" ]; then
echo "Creating icon library directory $GSDIR/Library/Icons" echo "Creating icon library directory $GSDIR/Library/Icons"