diff --git a/Makefile b/Makefile index c510f76..f5e65d4 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ rpms: sudo -E ./prepare_image prepared_images/$(TEMPLATE_NAME).img && \ sudo -E ./qubeize_image prepared_images/$(TEMPLATE_NAME).img $(TEMPLATE_NAME) && \ ./build_template_rpm $(TEMPLATE_NAME) || exit 1; \ - ./create-template-list.sh || : \ + ./create_template_list.sh || : \ update-repo-installer: [ -z "$$UPDATE_REPO" ] && UPDATE_REPO=../installer/yum/qubes-dom0;\ diff --git a/create-template-list.sh b/create_template_list.sh similarity index 93% rename from create-template-list.sh rename to create_template_list.sh index 0feaf73..260d3aa 100755 --- a/create-template-list.sh +++ b/create_template_list.sh @@ -6,26 +6,29 @@ TEMPLATES="./rpm/install-templates.sh" -TEMPLATES="$(readlink -m $TEMPLATES)" -touch "$TEMPLATES" write() { echo "$1" >> "$TEMPLATES" } -write "#!/bin/bash" -write "" - if [ -x /usr/sbin/xenstore-read ]; then XENSTORE_READ="/usr/sbin/xenstore-read" else XENSTORE_READ="/usr/bin/xenstore-read" fi +TEMPLATES="$(readlink -m $TEMPLATES)" VERSION="-$(cat ./version)" name=$($XENSTORE_READ name) path="$(readlink -m .)" files=$(ls rpm/noarch) +# +# Write to install-templates +# + +echo "#!/bin/bash" > "$TEMPLATES" +write "" + for file in ${files[@]}; do write "qvm-run --pass-io development-qubes 'cat ${path}/rpm/noarch/${file}' > ${file}" write ""