Skip to content

Commit 898f972

Browse files
saying121wyfcyx
authored andcommitted
fix(scripts): get correct major version
1 parent 419a576 commit 898f972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

os/scripts/qemu-ver-check.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ then
1313
exit 1
1414
else
1515
QEMU_VERSION=$($1 --version|head -n 1|awk '{print $4}')
16-
MAJOR_VERSION=$(echo $QEMU_VERSION|cut -c1-1)
16+
MAJOR_VERSION=$(echo $QEMU_VERSION | awk -F '.' '{print $1}')
1717
if [ $MAJOR_VERSION -lt $MINIMUM_MAJOR_VERSION ]
1818
then
1919
echo "${RED}Error: Required major version of QEMU is ${MINIMUM_MAJOR_VERSION}, " \

0 commit comments

Comments
 (0)