use /bin/echo instead of plain echo as e.g. ash's echo doesn't grok -e

This commit is contained in:
Paul Slootman 2002-07-04 10:52:18 +00:00
parent 49f29f4ce6
commit 79994019e9
1 changed files with 24 additions and 24 deletions

View File

@ -57,7 +57,7 @@ load_functions () {
# #
function comment () { function comment () {
comment_ctr=$[ comment_ctr + 1 ] comment_ctr=$[ comment_ctr + 1 ]
echo -ne "': $comment_ctr' '--- $1' " >>MCmenu /bin/echo -ne "': $comment_ctr' '--- $1' " >>MCmenu
} }
# #
@ -88,9 +88,9 @@ function bool () {
n) flag=" " ;; n) flag=" " ;;
esac esac
echo -ne "'$2' '[$flag] $1' " >>MCmenu /bin/echo -ne "'$2' '[$flag] $1' " >>MCmenu
echo -e "function $2 () { l_bool '$2' \"\$1\" ;}\n" >>MCradiolists /bin/echo -e "function $2 () { l_bool '$2' \"\$1\" ;}\n" >>MCradiolists
} }
# #
@ -113,9 +113,9 @@ function dep_bool () {
function int () { function int () {
eval $2=\${$2:-"$3"} x=\$$2 eval $2=\${$2:-"$3"} x=\$$2
echo -ne "'$2' '($x) $1' " >>MCmenu /bin/echo -ne "'$2' '($x) $1' " >>MCmenu
echo -e "function $2 () { l_int '$1' '$2' '$3' '$x' ;}" >>MCradiolists /bin/echo -e "function $2 () { l_int '$1' '$2' '$3' '$x' ;}" >>MCradiolists
} }
# #
@ -124,9 +124,9 @@ function int () {
function hex () { function hex () {
eval $2=\${$2:-"$3"} x=\${$2##*[x,X]} eval $2=\${$2:-"$3"} x=\${$2##*[x,X]}
echo -ne "'$2' '($x) $1' " >>MCmenu /bin/echo -ne "'$2' '($x) $1' " >>MCmenu
echo -e "function $2 () { l_hex '$1' '$2' '$3' '$x' ;}" >>MCradiolists /bin/echo -e "function $2 () { l_hex '$1' '$2' '$3' '$x' ;}" >>MCradiolists
} }
# #
@ -135,9 +135,9 @@ function hex () {
function string () { function string () {
eval $2=\${"$2":-"$3"} x=\$"$2" eval $2=\${"$2":-"$3"} x=\$"$2"
echo -ne "'$2' '\"$x\" $1' " >>MCmenu /bin/echo -ne "'$2' '\"$x\" $1' " >>MCmenu
echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists /bin/echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists
} }
# #
@ -171,9 +171,9 @@ function choice () {
: ${current:=$default} : ${current:=$default}
echo -ne "'$firstchoice' '($current) $title' " >>MCmenu /bin/echo -ne "'$firstchoice' '($current) $title' " >>MCmenu
echo -e " /bin/echo -e "
function $firstchoice () \ function $firstchoice () \
{ l_choice '$title' \"$choices\" $current ;}" >>MCradiolists { l_choice '$title' \"$choices\" $current ;}" >>MCradiolists
} }
@ -249,7 +249,7 @@ function show_readme () {
# Radiolist function file. # Radiolist function file.
# #
function menu_name () { function menu_name () {
echo -ne "$DIALOG --title '$1'\ /bin/echo -ne "$DIALOG --title '$1'\
--backtitle '$backtitle' \ --backtitle '$backtitle' \
--menu '$menu_instructions' \ --menu '$menu_instructions' \
$ROWS $COLS $((ROWS-10)) \ $ROWS $COLS $((ROWS-10)) \
@ -261,7 +261,7 @@ function menu_name () {
# Add a submenu option to the menu currently under construction. # Add a submenu option to the menu currently under construction.
# #
function submenu () { function submenu () {
echo -ne "'activate_menu $2' '$1 --->' " >>MCmenu /bin/echo -ne "'activate_menu $2' '$1 --->' " >>MCmenu
} }
# #
@ -280,7 +280,7 @@ function l_bool () {
*) eval $1=n ;; *) eval $1=n ;;
esac esac
else else
echo -ne "\007" /bin/echo -ne "\007"
fi fi
} }
@ -294,9 +294,9 @@ function disabled () {
*) flag=' ' ;; *) flag=' ' ;;
esac esac
echo -ne "'$2' '<$flag> $1' " >>MCmenu /bin/echo -ne "'$2' '<$flag> $1' " >>MCmenu
echo -e "function $2 () { l_disabled '$2' \"\$1\" ;}" >>MCradiolists /bin/echo -e "function $2 () { l_disabled '$2' \"\$1\" ;}" >>MCradiolists
} }
# #
@ -307,7 +307,7 @@ function l_disabled() {
then then
case "$2" in case "$2" in
n) ;; n) ;;
*) echo -en "\007" *) /bin/echo -en "\007"
${DIALOG} --backtitle "$backtitle" \ ${DIALOG} --backtitle "$backtitle" \
--msgbox "\ --msgbox "\
This feature depends on another which has been disabled. \ This feature depends on another which has been disabled. \
@ -315,7 +315,7 @@ As a result, this feature will be disabled also." 6 70
;; ;;
esac esac
else else
echo -ne "\007" /bin/echo -ne "\007"
fi fi
} }
@ -338,7 +338,7 @@ function l_int () {
eval $2="$answer" eval $2="$answer"
else else
eval $2="$3" eval $2="$3"
echo -en "\007" /bin/echo -en "\007"
${DIALOG} --backtitle "$backtitle" \ ${DIALOG} --backtitle "$backtitle" \
--msgbox "You have made an invalid entry." 5 43 --msgbox "You have made an invalid entry." 5 43
fi fi
@ -370,7 +370,7 @@ function l_hex () {
eval $2="$answer" eval $2="$answer"
else else
eval $2="$3" eval $2="$3"
echo -en "\007" /bin/echo -en "\007"
${DIALOG} --backtitle "$backtitle" \ ${DIALOG} --backtitle "$backtitle" \
--msgbox "You have made an invalid entry." 3 43 --msgbox "You have made an invalid entry." 3 43
fi fi
@ -714,7 +714,7 @@ last retrieved. Leave blank to abort."\
eval load_config_file "$ALT_CONFIG" eval load_config_file "$ALT_CONFIG"
break break
else else
echo -ne "\007" /bin/echo -ne "\007"
$DIALOG --backtitle "$backtitle" \ $DIALOG --backtitle "$backtitle" \
--msgbox "File does not exist!" 3 38 --msgbox "File does not exist!" 3 38
fi fi
@ -777,7 +777,7 @@ as an alternate. Leave blank to abort."\
load_functions ## RELOAD load_functions ## RELOAD
break break
else else
echo -ne "\007" /bin/echo -ne "\007"
$DIALOG --backtitle "$backtitle" \ $DIALOG --backtitle "$backtitle" \
--msgbox "Can't create file! Probably a nonexistent directory." 3 60 --msgbox "Can't create file! Probably a nonexistent directory." 3 60
fi fi
@ -1009,7 +1009,7 @@ set_geometry () {
if [ $ROWS -lt 19 -o $COLS -lt 80 ] if [ $ROWS -lt 19 -o $COLS -lt 80 ]
then then
echo -e "\n\007Your display is too small to run Menuconfig!" /bin/echo -e "\n\007Your display is too small to run Menuconfig!"
echo "It must be at least 19 lines by 80 columns." echo "It must be at least 19 lines by 80 columns."
exit 0 exit 0
fi fi
@ -1125,7 +1125,7 @@ the package with "make install" (Installation requires root privileges).
EOM EOM
else else
clear clear
echo -e "Your configuration changes were NOT saved.\n" /bin/echo -e "Your configuration changes were NOT saved.\n"
fi fi