Write image names to image.txt

This commit is contained in:
Jakob Lechner 2020-01-24 00:10:23 +01:00
parent 7ec88bfe39
commit 762869b77c
3 changed files with 11 additions and 5 deletions

View file

@ -1,12 +1,17 @@
#!/bin/sh
set -e
set -o nounset
export NAME="$1"
mkdir -p images
export IMAGES="$(realpath images)"
cd packer
(
cd packer
python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=4)' < "$NAME.yaml" > "$NAME.json"
python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=4)' < "$NAME.yaml" > "$NAME.json"
packer build "$NAME.json"
packer build "$NAME.json"
)
echo "$NAME" >> images.txt