specify image as parameter
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 26 Sep 2010 19:39:09 +0000 (21:39 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 26 Sep 2010 19:40:05 +0000 (21:40 +0200)
qemu-mount.sh

index 01202f4..d2425d7 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 image=emulator/android-x86-1.6-r2.boot.qcow2
+test ! -z "$1" && image=$1
 
 if mount | grep /tmp/qemu ; then
        echo "umount"
@@ -13,7 +14,7 @@ fi
 
 echo "mount $image"
 
-qemu-nbd emulator/android-x86-1.6-r2.boot.qcow2 &
+qemu-nbd $image &
 sudo nbd-client localhost 1024 /dev/nbd0
 mkdir /tmp/qemu
 echo "wait for partitions"