From 87a73e8216f9b0f1d4229c683f75b97c57832952 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Mon, 24 Oct 2011 17:06:58 -0700 Subject: [PATCH] only run apt-get install if needed - fixes multiple builds being kicked off at once --- tools/build_kvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh index 03a3877..dbfb5ce 100755 --- a/tools/build_kvm.sh +++ b/tools/build_kvm.sh @@ -101,8 +101,8 @@ function kill_unmount() { exit 1 } -# Install deps -apt-get install -y --force-yes kvm libvirt-bin kpartx +# Install deps if needed +dpkg -l kvm libvirt-bin kpartx || apt-get install -y --force-yes kvm libvirt-bin kpartx # Let Ctrl-c kill tail and exit trap kill_unmount SIGINT