Skip to content

Commit

Permalink
shellcheck, syntax for alpine packer run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel committed Oct 16, 2023
1 parent 054e9dc commit 9f1a91e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
File renamed without changes.
11 changes: 5 additions & 6 deletions packer/alpine316/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ||:

0 comments on commit 9f1a91e

Please sign in to comment.