Write image names to image.txt
This commit is contained in:
parent
7ec88bfe39
commit
762869b77c
3 changed files with 11 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue