mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-16 23:43:32 +01:00
- Fixed some non-portable shell constructs used in installed scripts
(Johnny C. Lam <lamj@stat.cmu.edu>) - Fixed crash with long titles in the window list menu (Alban Hertroys <dalroi@wit401310.student.utwente.nl>)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
PROGRAM=`basename $0`
|
||||
VERSION="0.1"
|
||||
|
||||
if [ "x$GNUSTEP_USER_ROOT" == "x" ]; then
|
||||
if [ "x$GNUSTEP_USER_ROOT" = "x" ]; then
|
||||
GSDIR="$HOME/GNUstep"
|
||||
else
|
||||
GSDIR="$GNUSTEP_USER_ROOT"
|
||||
@@ -33,7 +33,7 @@ help_msg() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
if (( $# == 0 )); then
|
||||
if [ $# -eq 0 ]; then
|
||||
help_msg
|
||||
fi
|
||||
|
||||
@@ -52,7 +52,7 @@ for i in $*; do
|
||||
fi;;
|
||||
esac
|
||||
done
|
||||
if [ "$new_locale" == "default" ]; then
|
||||
if [ "$new_locale" = "default" ]; then
|
||||
new_locale=""
|
||||
fi
|
||||
|
||||
@@ -75,7 +75,7 @@ fi
|
||||
|
||||
echo -n "Setting Window Maker root menu... "
|
||||
|
||||
if [ -z "$new_locale" ] || [ "$new_locale" == "en" ]; then
|
||||
if [ -z "$new_locale" ] || [ "$new_locale" = "en" ]; then
|
||||
menu_list="plmenu menu"
|
||||
else
|
||||
menu_list="plmenu.$new_locale menu.$new_locale plmenu menu"
|
||||
@@ -88,7 +88,12 @@ for new_menu in $menu_list; do
|
||||
else
|
||||
echo "fail (copying default)"
|
||||
fi
|
||||
if [ "${new_menu:0:4}" == "menu" ]; then # plain
|
||||
new_menu_tmp=$new_menu
|
||||
# Set new_menu_tmp to first 4 letters of $new_menu.
|
||||
while [ ${#new_menu_tmp} -gt 4 ]; do
|
||||
new_menu_tmp=${new_menu_tmp%?}
|
||||
done
|
||||
if [ "${new_menu_tmp}" = "menu" ]; then # plain
|
||||
echo "\"$wm_dir/$new_menu\"" >"$GSDIR/Defaults/WMRootMenu"
|
||||
else # proplist
|
||||
cp -f "$wm_dir/$new_menu" "$GSDIR/Defaults/WMRootMenu"
|
||||
@@ -104,7 +109,7 @@ fi
|
||||
|
||||
echo -n "Setting Window Maker fonts... "
|
||||
|
||||
if [ -z "$new_locale" ] || [ "$new_locale" == "en" ]; then
|
||||
if [ -z "$new_locale" ] || [ "$new_locale" = "en" ]; then
|
||||
args="default $nodef"
|
||||
else
|
||||
args="--locale=$new_locale $nodef"
|
||||
|
||||
Reference in New Issue
Block a user