diff --git a/packer/alpine316/alpine.json b/packer/alpine316/alpine316.json similarity index 100% rename from packer/alpine316/alpine.json rename to packer/alpine316/alpine316.json diff --git a/packer/alpine316/run.sh b/packer/alpine316/run.sh index 13187a84..1345c77f 100755 --- a/packer/alpine316/run.sh +++ b/packer/alpine316/run.sh @@ -4,19 +4,18 @@ DISTRO=$1 DST=$2 -DIR_CURR=$(dirname $0) +DIR_CURR=$(dirname "$0") BASE_IMAGE=$DIR_BASE/$DISTRO.img PACKER_WORKING_DIR=$DIR_BUILD/_packer/$DISTRO -mkdir -p $PACKER_WORKING_DIR +mkdir -p "$PACKER_WORKING_DIR" packer build -force \ -var "base_image=${BASE_IMAGE}" \ -var "qemu_binary=${QEMU_BINARY}" \ -var "appliance_name=${DISTRO}" \ - -var "distro=${DISTRO}" \ -var "http_dir=${DIR_CURR}" \ -var "output_dir=${PACKER_WORKING_DIR}" \ - $DIR_CURR/alpine.json + "$DIR_CURR/$DISTRO.json" -mv $PACKER_WORKING_DIR/$DISTRO $DST -rmdir $DIR_BUILD/_packer/$DISTRO ||: +mv "$PACKER_WORKING_DIR/$DISTRO" "$DST" +rmdir "$DIR_BUILD/_packer/$DISTRO" ||: