ia64/xen-unstable

annotate tools/check/check_python_devel @ 13032:afc6b5a60866

[TOOLS] Fix check-script compatibility with non-bash shells.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Dec 14 16:00:31 2006 +0000 (2006-12-14)
parents cc180acf4693
children 67c5d83cdcd2
rev   line source
kfraser@13032 1 #!/bin/sh
kfraser@12546 2 # CHECK-BUILD
kfraser@12546 3
kfraser@12546 4 function error {
kfraser@12546 5 echo
kfraser@12546 6 echo " *** Check for python development environment FAILED"
kfraser@12546 7 exit 1
kfraser@12546 8 }
kfraser@12546 9
kfraser@13032 10 RC=0
kfraser@13032 11
kfraser@12546 12 python -c '
kfraser@12546 13 import os.path, sys
kfraser@12546 14 for p in sys.path:
kfraser@12546 15 if os.path.exists(p + "/config/Makefile"):
kfraser@12546 16 sys.exit(0)
kfraser@12546 17 sys.exit(1)
kfraser@13032 18 ' || RC=1
kfraser@13032 19
kfraser@13032 20 if test ${RC} -ne 0; then
kfraser@13032 21 echo
kfraser@13032 22 echo " *** Check for python development environment FAILED"
kfraser@13032 23 fi
kfraser@13032 24
kfraser@13032 25 exit ${RC}