From 128e9f85db567e01bd3119b1fe989d679976a773 2017-01-05 00:52:10 From: drtyhlpr Date: 2017-01-05 00:52:10 Subject: [PATCH] Merge pull request #62 from Coucouf/relax-apt-lock-usage Don’t require apt lock to be available on build machine if there are no packages to install --- diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index d2a977e..9b3a231 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -249,7 +249,7 @@ for package in $REQUIRED_PACKAGES ; do fi done -# Ask if missing packages should get installed right now +# If there are missing packages ask confirmation for install, or exit if [ -n "$MISSING_PACKAGES" ] ; then echo "the following packages needed by this script are not installed:" echo "$MISSING_PACKAGES" @@ -257,10 +257,10 @@ if [ -n "$MISSING_PACKAGES" ] ; then echo -n "\ndo you want to install the missing packages right now? [y/n] " read confirm [ "$confirm" != "y" ] && exit 1 -fi -# Make sure all required packages are installed -apt-get -qq -y install ${REQUIRED_PACKAGES} + # Make sure all missing required packages are installed + apt-get -qq -y install ${MISSING_PACKAGES} +fi # Check if ./bootstrap.d directory exists if [ ! -d "./bootstrap.d/" ] ; then