From 005ebf8c7310835e0841ee3615bafa3f40465018 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 21 Apr 2016 03:14:05 +0000 Subject: ifchange: ignore unmatch TEST_COLORS * configure.in: check if succeeded in creating config.h. * tool/ifchange: ignore failures when TEST_COLORS unmatched. just use the default value if expected name is not contained in it. [ruby-core:75046] [Bug #12303] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/ifchange | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tool/ifchange') diff --git a/tool/ifchange b/tool/ifchange index 7779b28a63..08aaba570c 100755 --- a/tool/ifchange +++ b/tool/ifchange @@ -40,7 +40,7 @@ target="$1" temp="$2" if [ "$temp" = - ]; then temp="tmpdata$$.tmp~" - cat > "$temp" || exit $? + cat > "$temp" trap 'rm -f "$temp"' 0 fi @@ -50,8 +50,8 @@ if [ "$color" = always -o \( "$color" = auto -a -t 1 \) ]; then case "`tput smso 2>/dev/null`" in "$msg_begin"*m) if [ ${TEST_COLORS:+set} ]; then - msg_unchanged=`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"` - msg_updated=`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"` + msg_unchanged=`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"` || : + msg_updated=`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"` || : fi msg_unchanged="${msg_begin}${msg_unchanged:-32;1}m" msg_updated="${msg_begin}${msg_updated:-31;1}m" -- cgit v1.2.3