more compatible
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1517 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
ESC=`printf "\x1b"`
|
ESC=`printf '\033'`
|
||||||
ANSI_BOLD="${ESC}[1m"
|
ANSI_BOLD="${ESC}[1m"
|
||||||
ANSI_NORMAL="${ESC}[0m"
|
ANSI_NORMAL="${ESC}[0m"
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
BUILDLOG=/dev/null
|
#BUILDLOG=/dev/null
|
||||||
|
BUILDLOG=/tmp/build.log
|
||||||
TEMPFILE="/tmp/build.$$.tmp"
|
TEMPFILE="/tmp/build.$$.tmp"
|
||||||
|
|
||||||
# Description: prints a command to stdout and then executes it
|
# Description: prints a command to stdout and then executes it
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if what the user entered was a number
|
# Check if what the user entered was a number
|
||||||
egrep -q "^[0-9]+$" << EOF
|
egrep '^[0-9]+$' << EOF > /dev/null
|
||||||
$CHOICE
|
$CHOICE
|
||||||
EOF
|
EOF
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@@ -357,10 +357,10 @@ EOF
|
|||||||
SELECTED=" "
|
SELECTED=" "
|
||||||
fi
|
fi
|
||||||
if menu_have_choice "$MENU" "$OPTION"; then
|
if menu_have_choice "$MENU" "$OPTION"; then
|
||||||
printf " %*i. %s %s\n" "${#NUM_OPTIONS}" "$I" \
|
printf " %${#NUM_OPTIONS}i. %s %s\n" "$I" "$SELECTED" \
|
||||||
"$SELECTED" "$TEMP_TITLE"
|
"$TEMP_TITLE"
|
||||||
else
|
else
|
||||||
printf " %-*s %s (N/A) %s\n" "${#NUM_OPTIONS}" "-" \
|
printf " %-${#NUM_OPTIONS}s %s (N/A) %s\n" "-" \
|
||||||
"$SELECTED" "$TEMP_TITLE"
|
"$SELECTED" "$TEMP_TITLE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -378,7 +378,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if what the user entered was a number
|
# Check if what the user entered was a number
|
||||||
egrep -q "^[0-9]+$" << EOF
|
egrep '^[0-9]+$' << EOF > /dev/null
|
||||||
$CHOICE
|
$CHOICE
|
||||||
EOF
|
EOF
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user