In disk-image-create, append to INSTALL_PACKAGES instead of clobbering.

This allows -p <packagelist> to be used multiple times.

Change-Id: Iabe43982e1606c7ca963a1dd3b23ba47d148ae38
Closes-Bug: #1641157
This commit is contained in:
Oliver Walsh 2016-11-11 17:03:50 +00:00
parent 587d14feed
commit ae66b64c34

View File

@ -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;;