[MPlayer-cvslog] CVS: main/TOOLS checktree.sh,1.2,1.3

The Wanderer CVS syncmail at mplayerhq.hu
Wed Dec 7 19:12:01 CET 2005


CVS change done by The Wanderer CVS

Update of /cvsroot/mplayer/main/TOOLS
In directory mail:/var2/tmp/cvs-serv13793/TOOLS

Modified Files:
	checktree.sh 
Log Message:
option to show the lines containing anomalies, patch by Ivo van Poorten

Index: checktree.sh
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/checktree.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- checktree.sh	6 Sep 2005 15:30:12 -0000	1.2
+++ checktree.sh	7 Dec 2005 18:11:58 -0000	1.3
@@ -22,6 +22,7 @@
 _trailws=no
 _rcsid=no
 _oll=no
+_showcont=no
 
 _color=yes
 _head=yes
@@ -103,6 +104,9 @@
         echo
         printoption "all       " "enable all tests" "no"
         echo
+        printoption "showcont  " "show offending content of file(s)" \
+                                                                    "$_showcont"
+        echo
         printoption "color     " "colored output" "$_color"
         printoption "head      " "print heading for each test" "$_head"
         printoption "cvs       " "use CVS/ to determine which files to check" \
@@ -174,6 +178,12 @@
     -none)
         disable_all_tests
         ;;
+    -showcont)
+        _showcont=yes
+        ;;
+    -noshowcont)
+        _showcont=no
+        ;;
     -*)
         echo "unknown option: $i" >&2
         exit 0
@@ -222,14 +232,22 @@
 
 if [ "$_crlf" == "yes" ]; then
     printhead "checking for MSDOS line endings ..."
+    if [ "$_showcont" == "yes" ]; then
+        grep -n -I "
" $filelist
+    else
     grep -l -I "
" $filelist
+    fi
 fi
 
 # -----------------------------------------------------------------------------
 
 if [ "$_trailws" == "yes" ]; then
     printhead "checking for trailing whitespace ..."
+    if [ "$_showcont" == "yes" ]; then
+        grep -n -I "[[:space:]]\+$" $filelist
+    else
     grep -l -I "[[:space:]]\+$" $filelist
+    fi
 fi
 
 # -----------------------------------------------------------------------------
@@ -243,7 +261,11 @@
 
 if [ "$_oll" == "yes" ]; then
     printhead "checking for overly long lines (over 79 characters) ..."
+    if [ "$_showcont" == "yes" ]; then
+        grep -n -I "^[[:print:]]\{80,\}$" $filelist
+    else
     grep -l -I "^[[:print:]]\{80,\}$" $filelist
+    fi
 fi
 
 # -----------------------------------------------------------------------------




More information about the MPlayer-cvslog mailing list