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, see <http://www.gnu.org/licenses/>. 15# 16 17 18set -e 19 20 21evalVariables() 22{ 23 for arg in "$@" 24 do 25 if expr 'index' "$arg" '=' '>' '1' >/dev/null 26 then 27 eval "$arg" 28 fi 29 done 30} 31 32 33findCommand() 34{ 35 for arg in "$@" 36 do 37 if ! expr 'index' "$arg" '=' >/dev/null 38 then 39 command="$arg" 40 return 41 fi 42 done 43} 44