[MPlayer-cvslog] r23969 - trunk/TOOLS/checktree.sh

ivo subversion at mplayerhq.hu
Tue Jul 31 16:50:44 CEST 2007


Author: ivo
Date: Tue Jul 31 16:50:44 2007
New Revision: 23969

Log:
Shorten (un)setting of all test flags

Now that we have a list of all flags, we can set them to yes or no with a
for-loop.


Modified:
   trunk/TOOLS/checktree.sh

Modified: trunk/TOOLS/checktree.sh
==============================================================================
--- trunk/TOOLS/checktree.sh	(original)
+++ trunk/TOOLS/checktree.sh	Tue Jul 31 16:50:44 2007
@@ -63,32 +63,10 @@ export LC_ALL=C
 
 # Helper functions
 
-enable_all_tests() {
-    _spaces=yes
-    _extensions=yes
-    _crlf=yes
-    _tabs=yes
-    _trailws=yes
-    _rcsid=yes
-    _oll=yes
-    _charset=yes
-    _stupid=yes
-    _gnu=yes
-    _res=yes
-}
-
-disable_all_tests() {
-    _spaces=no
-    _extensions=no
-    _crlf=no
-    _tabs=no
-    _trailws=no
-    _rcsid=no
-    _oll=no
-    _charset=no
-    _stupid=no
-    _gnu=no
-    _res=no
+set_all_tests() {
+    for i in $testflags ; do
+        eval _$i=$1
+    done
 }
 
 printoption() {
@@ -148,13 +126,13 @@ for i in "$@"; do
         exit
         ;;
     -all)
-        enable_all_tests
+        set_all_tests yes
         ;;
     -noall)
-        disable_all_tests
+        set_all_tests no
         ;;
     -none)
-        disable_all_tests
+        set_all_tests no
         ;;
     -*)
         var=`echo X$i | sed 's/^X-//'`



More information about the MPlayer-cvslog mailing list