[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Portability patch for tools/check



On Thu, Dec 14, 2006 at 04:47:19PM +0100, Christoph Egger wrote:

> 
> Hi!
> 
> I did a little off-list discussion with Jan.
> 
> Attached is a patch, which makes the non-portable scripts in tools/check 
> portable.
> 
> Christoph
>
> [Snip]
>
> diff -r 360eb996fa38 tools/check/check_python_devel
> --- a/tools/check/check_python_devel  Wed Dec 13 16:13:26 2006 +0000
> +++ b/tools/check/check_python_devel  Thu Dec 14 15:46:50 2006 +0100
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/bin/sh
>  # CHECK-BUILD
>  
>  function error {
> @@ -7,10 +7,19 @@ function error {
>      exit 1
>  }
>  
> +RC=0
> +
>  python -c '
>  import os.path, sys
>  for p in sys.path:
>       if os.path.exists(p + "/config/Makefile"):
>               sys.exit(0)
>  sys.exit(1)
> -' || error
> +' || RC=1 
> +
> +if test ${RC} -ne 0; then
> +     echo
> +     echo " *** Check for python development environment FAILED"
> +fi
> +
> +exit ${RC}

So we now have an uncalled error function at the top of the script.  Is this
intentional?  What's non-portable about functions anyway?  POSIX.1 defines a
function definition syntax
(http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html).

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.