Renamed create-template-list.sh to create_template_list.sh; overwrite file each time

This commit is contained in:
Jason Mehring 2014-10-18 10:53:11 -04:00
parent c87c046fe1
commit 3da7d92dc8
2 changed files with 9 additions and 6 deletions

View File

@ -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;\

View File

@ -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 ""