ia64/xen-unstable

changeset 13030:664e762a10e8

[TOOLS] A couple of check-script cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Dec 14 15:12:38 2006 +0000 (2006-12-14)
parents 6a28bfc1a940
children 7b6aba313aac
files tools/check/check_python tools/check/check_python_xml
line diff
     1.1 --- a/tools/check/check_python	Thu Dec 14 15:06:22 2006 +0000
     1.2 +++ b/tools/check/check_python	Thu Dec 14 15:12:38 2006 +0000
     1.3 @@ -3,7 +3,10 @@
     1.4  
     1.5  RC=0
     1.6  
     1.7 -python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || RC=1
     1.8 +python -c '
     1.9 +import sys
    1.10 +sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 2)
    1.11 +' || RC=1
    1.12  
    1.13  if test ${RC} -ne 0; then
    1.14  	echo
     2.1 --- a/tools/check/check_python_xml	Thu Dec 14 15:06:22 2006 +0000
     2.2 +++ b/tools/check/check_python_xml	Thu Dec 14 15:12:38 2006 +0000
     2.3 @@ -1,11 +1,7 @@
     2.4  #!/bin/bash
     2.5  # CHECK-INSTALL
     2.6  
     2.7 -function error {
     2.8 -    echo
     2.9 -    echo "  *** Check for python-xml package FAILED"
    2.10 -    exit 1
    2.11 -}
    2.12 +RC=0
    2.13  
    2.14  python -c '
    2.15  import os.path, sys
    2.16 @@ -13,4 +9,11 @@ for p in sys.path:
    2.17  	if os.path.exists(p + "/xml/dom/minidom.py"):
    2.18  		sys.exit(0)
    2.19  sys.exit(1)
    2.20 -' || error
    2.21 +' || RC=1
    2.22 +
    2.23 +if test ${RC} -ne 0; then
    2.24 +    echo
    2.25 +    echo "  *** Check for python-xml package FAILED"
    2.26 +fi
    2.27 +
    2.28 +exit ${RC}