From: dan Date: Tue, 24 Jul 2001 20:18:19 +0000 (+0000) Subject: Applied patch from Marcelo E. Magallon X-Git-Tag: wmaker-0.92.0+~475 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/46e12bffb621d4a8f3a9dacaf6441032d22e28bd Applied patch from Marcelo E. Magallon to fix some more bash specific constructs in wsetfont. --- diff --git a/ChangeLog b/ChangeLog index cf608065..60661d75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +- Fixed some more bash specific constructs in wsetfont. + (Marcelo E. Magallon ) Changes since version 0.65.0: ............................. diff --git a/util/wsetfont b/util/wsetfont index c5ef7705..aab25477 100755 --- a/util/wsetfont +++ b/util/wsetfont @@ -33,12 +33,11 @@ WDREAD="wdread" PROGRAM=`basename $0` help_msg() { - echo -e "\n"\ - "$PROGRAM - font/language setting utility for Window Maker\n"\ - "\n"\ - "Usage: $VERSION\n"\ - " $PROGRAM [--nodef] [--auto] " >/dev/stderr cat >/dev/stderr < ----------------------------------------------------------------------- [font_fam] [Fontset] [Font Information] default helvetica @@ -76,10 +75,10 @@ for i in $*; do nodef="YES";; "--auto") auto="YES";; + --locale=*) + new_locale=`echo $i |sed -e "s|--locale=||" -`;; *) - if echo $i |grep "^--locale=" >/dev/null 2>&1; then - new_locale=$(echo $i |sed -e "s|--locale=||") - elif [ -z $family ]; then + if [ -z $family ]; then family=$i else help_msg @@ -234,10 +233,10 @@ for i in $Supported; do fi done if test -z "$is_supported"; then # unknown coding - echo -e "\n"\ - "Sorry, font coding $family or locale $locale not recognized.\n"\ - "Type $PROGRAM with no arguments for list of supported font codings...\n"\ - "" >/dev/stderr + cat >/dev/stderr </dev/stderr + cat >/dev/stderr <<-EOT +Sorry, --nodef argument is not allowed for these font codings: + $NodefUnable +Run $PROGRAM without --nodef argument to set default fonts for your +font coding. +EOT exit 1 else is_nodef_unable="YES" @@ -289,13 +288,14 @@ if test -z "$nodef"; then fi done else - echo -e "\n"\ - "You used --nodef command line argument. You should note, that this\n"\ - "works with these font codings only:\n"\ - " $NodefAble\n"\ - "You should not use it to change fonts from other font codings than\n"\ - "those listed above. If your WindowMaker does not appear to find fonts,\n"\ - "you should run $PROGRAM once again without --nodef argument." >/dev/stderr + cat >/dev/stderr <