[前][次][番号順一覧][スレッド一覧]

ruby-changes:40123

From: nobu <ko1@a...>
Date: Tue, 20 Oct 2015 23:40:35 +0900 (JST)
Subject: [ruby-changes:40123] nobu:r52204 (trunk): test -t

nobu	2015-10-20 23:40:17 +0900 (Tue, 20 Oct 2015)

  New Revision: 52204

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52204

  Log:
    test -t
    
    * aclocal.m4, tool/ifchange: make the fd explict.
      [ruby-dev:49311] [Bug #11608]

  Modified files:
    trunk/aclocal.m4
    trunk/tool/ifchange
Index: aclocal.m4
===================================================================
--- aclocal.m4	(revision 52203)
+++ aclocal.m4	(revision 52204)
@@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/aclocal.m4#L2
 
 AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
     msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
-    AS_IF([test -t], [
+    AS_IF([test -t 1], [
 	msg_begin="`tput smso 2>/dev/null`"
     	AS_CASE(["$msg_begin"], ['@<:@'*m],
 	    [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"
Index: tool/ifchange
===================================================================
--- tool/ifchange	(revision 52203)
+++ tool/ifchange	(revision 52204)
@@ -38,7 +38,7 @@ if [ "$temp" = - ]; then https://github.com/ruby/ruby/blob/trunk/tool/ifchange#L38
 fi
 
 msg_begin= msg_unchanged= msg_updated= msg_reset=
-if [ -t ]; then
+if [ -t 1 ]; then
     msg_begin="`tput smso 2>/dev/null`"
     case "$msg_begin" in
 	""*m)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]