From 8f781dfa765dd14463e44acaf557564f5ec54139 2016-12-29 13:44:46 From: Aurélien COUDERC Date: 2016-12-29 13:44:46 Subject: [PATCH] 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 e66b297..5661e07 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