ia64/xen-unstable

view tools/examples/xen-script-common.sh @ 10098:48c0f5489d44

Remove Emacs variables settings from tail of our Linux files.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 18 11:39:03 2006 +0100 (2006-05-18)
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 }