From bb04e97ccf43149e233eab935fe1fcb94357c676 Mon Sep 17 00:00:00 2001 From: nacho Date: Thu, 25 May 2017 17:02:54 +0200 Subject: [PATCH] fix parsing version for ubuntu 2.5.0 --- qemu-pi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-pi.sh b/qemu-pi.sh index 9fcc028..607bde2 100755 --- a/qemu-pi.sh +++ b/qemu-pi.sh @@ -120,8 +120,8 @@ EOF # This works but modifies the image so it is recommended to upgrade QEMU # Ref: http://stackoverflow.com/questions/38837606/emulate-raspberry-pi-raspbian-with-qemu -QEMU_MAJOR=$( qemu-system-arm --version | head -1 | grep -oP '\d+.\d+.\d+' | cut -d. -f1 ) -QEMU_MINOR=$( qemu-system-arm --version | head -1 | grep -oP '\d+.\d+.\d+' | cut -d. -f2 ) +QEMU_MAJOR=$( qemu-system-arm --version | grep -oP '\d+\.\d+\.\d+' | head -1 | cut -d. -f1 ) +QEMU_MINOR=$( qemu-system-arm --version | grep -oP '\d+\.\d+\.\d+' | head -1 | cut -d. -f2 ) if [[ $QEMU_MAJOR == 2 ]] && [[ $QEMU_MINOR < 8 ]]; then sed -i '/^[^#].*libarmmem.so/s/^\(.*\)$/#\1/' tmpmnt/etc/ld.so.preload; fi if [[ $QEMU_MAJOR < 2 ]] ; then sed -i '/^[^#].*libarmmem.so/s/^\(.*\)$/#\1/' tmpmnt/etc/ld.so.preload; fi