ia64/xen-unstable

view tools/examples/xen-script-common.sh @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 4722eae11abb
children
line source
1 #
2 # Copyright (c) 2005 XenSource Ltd.
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of version 2.1 of the GNU Lesser General Public
6 # License as published by the Free Software Foundation.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 #
19 set -e
22 evalVariables()
23 {
24 for arg in "$@"
25 do
26 if expr 'index' "$arg" '=' '>' '1' >/dev/null
27 then
28 eval "$arg"
29 fi
30 done
31 }
34 findCommand()
35 {
36 for arg in "$@"
37 do
38 if ! expr 'index' "$arg" '=' >/dev/null
39 then
40 command="$arg"
41 return
42 fi
43 done
44 }