Author: glen                         Date: Fri Aug 26 08:51:01 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- skip colourization if output is not terminal

---- Files affected:
SPECS:
   builder (1.325 -> 1.326) 

---- Diffs:

================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.325 SPECS/builder:1.326
--- SPECS/builder:1.325 Tue Aug 23 21:41:39 2005
+++ SPECS/builder       Fri Aug 26 10:50:55 2005
@@ -134,7 +134,7 @@
 else
        wget --help 2>&1 | grep -q ' \-\-inet ' && WGET_OPTS="$WGET_OPTS --inet"
        wget --help 2>&1 | grep -q ' \-\-retry\-connrefused ' && 
WGET_OPTS="$WGET_OPTS --retry-connrefused"
-        
+
        GETURI="wget --passive-ftp -c -nd -t$WGET_RETRIES $WGET_OPTS"
        GETURI2="wget -c -nd -t$WGET_RETRIES $WGET_OPTS"
        OUTFILEOPT="-O"
@@ -1398,8 +1398,8 @@
 
         if [ "`diff --brief $SPECFILE $tmpdir/$SPECFILE`" ] ; then
                  diff -u $SPECFILE $tmpdir/$SPECFILE > $tmpdir/$SPECFILE.diff
-                 diffcol $tmpdir/$SPECFILE.diff | less -r
-                 (
+                 if [ -t 1 ]; then
+                               diffcol $tmpdir/$SPECFILE.diff | less -r
                                while : ; do
                                         echo -n "Accept? [yn] "
                                         read ans
@@ -1415,7 +1415,9 @@
                                         ;;
                                         esac
                                done
-                 )
+                 else
+                               cat $tmpdir/$SPECFILE.diff
+                 fi
         else
                  echo "The SPEC is perfect ;)"
         fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/builder?r1=1.325&r2=1.326&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to