summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-31 14:50:44 +0000
committerivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-31 14:50:44 +0000
commitf621fa29616909ebe5bc867161f55f433b66496e (patch)
tree9d34e6cf3bc4a14bb47a7cb30dcad4dc33f574a1 /TOOLS
parentc9be32501bd2da02e41ef92ec2db84c9c7e1c081 (diff)
downloadmpv-f621fa29616909ebe5bc867161f55f433b66496e.tar.bz2
mpv-f621fa29616909ebe5bc867161f55f433b66496e.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23969 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/checktree.sh36
1 files changed, 7 insertions, 29 deletions
diff --git a/TOOLS/checktree.sh b/TOOLS/checktree.sh
index 2329a1f8d0..2b2d48aef0 100755
--- a/TOOLS/checktree.sh
+++ b/TOOLS/checktree.sh
@@ -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-//'`