2 # Copyright (c) 2018 Cisco and/or its affiliates.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
17 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
20 source ${SCRIPT_DIR}/config/defaults
21 source ${SCRIPT_DIR}/shell/qemu_utils.sh
26 if echo $line | grep -F = &>/dev/null
28 varname=$(echo "$line" | cut -d '=' -f 1)
29 cfg[$varname]=$(echo "$line" | cut -d '=' -f 2-)
31 done < ${SCRIPT_DIR}/config/config
37 cfg['QEMU_INSTALL_VERSION']="${i#*=}"
40 cfg['QEMU_INSTALL_DIR']="${i#*=}"
43 cfg['QEMU_PATCH']=true
46 cfg['QEMU_FORCE_INSTALL']=true
49 cfg['QEMU_TARGET_LIST']="${i#*=}"
57 qemu_utils.qemu_install ${cfg[QEMU_INSTALL_DIR]} ${cfg[QEMU_INSTALL_VERSION]} \
58 ${cfg[QEMU_PATCH]} ${cfg[QEMU_FORCE_INSTALL]} ${cfg[QEMU_TARGET_LIST]}