From ae66b64c34ea4209e09adf804c8cd8446d7ae5db Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Fri, 11 Nov 2016 17:03:50 +0000 Subject: [PATCH] In disk-image-create, append to INSTALL_PACKAGES instead of clobbering. This allows -p to be used multiple times. Change-Id: Iabe43982e1606c7ca963a1dd3b23ba47d148ae38 Closes-Bug: #1641157 --- bin/disk-image-create | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/disk-image-create b/bin/disk-image-create index 45d8024b..415cbaf9 100755 --- a/bin/disk-image-create +++ b/bin/disk-image-create @@ -133,7 +133,7 @@ function show_options () { echo " --docker-target -- specify the repo and tag to use if the output type is docker. Defaults to the value of output imagename" if [ "$IS_RAMDISK" == "0" ]; then echo " -n skip the default inclusion of the 'base' element" - echo " -p package[,package,package] -- list of packages to install in the image" + echo " -p package[,package,package] -- list of packages to install in the image. If specified multiple times the packages are appended to the list." fi echo " -h|--help -- display this help and exit" echo " --version -- display version and exit" @@ -190,7 +190,7 @@ while true ; do -u) shift; export COMPRESS_IMAGE="";; -c) shift ; export CLEAR_ENV=1;; -n) shift; export SKIP_BASE="1";; - -p) IFS="," read -a INSTALL_PACKAGES <<< "$2"; export INSTALL_PACKAGES ; shift 2 ;; + -p) IFS="," read -a _INSTALL_PACKAGES <<< "$2"; export INSTALL_PACKAGES=( ${INSTALL_PACKAGES[@]} ${_INSTALL_PACKAGES[@]} ) ; shift 2 ;; --checksum) shift; export DIB_CHECKSUM=1;; --image-size) export DIB_IMAGE_SIZE=$2; shift 2;; --image-cache) export DIB_IMAGE_CACHE=$2; shift 2;;