3 ###############################################################################
4 ## Copyright (c) 2016 Intel Corp.
6 ## All rights reserved. This program and the accompanying materials
7 ## are made available under the terms of the Apache License, Version 2.0
8 ## which accompanies this distribution, and is available at
9 ## http://www.apache.org/licenses/LICENSE-2.0
10 ###############################################################################
15 QEMU_VERSION=$( getQemuVersion )
17 if [ -z $QEMU_VERSION ];then
18 echo "qemu RPM not found"
21 rpmdir=${1:-"/root/workspace/rpm/"}
22 rpmpat="qemu-${QEMU_VERSION}*.rpm"
25 # Removing Existing qemu rpms
26 qemu_rpm=$(rpm -qa | grep 'qemu')
27 echo "Removing Existing qemu packages"
29 # Install the qemu rpm
30 filenum=`ls -l ${rpmdir}/${rpmpat} |wc -l`
33 echo "No qemu rpm found in workspace/rpm"
35 elif [ $filenum -gt 1 ]
37 echo "Multiple qemu rpm found in workspace/rpm"
40 qrpm=`find "${rpmdir}" -name "${rpmpat}"`