From e6f0bc559802abae16e06c79062f1910538fbedd Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 4 Apr 2014 20:24:44 -0400 Subject: Store different os versions in different output directories. (I guess this means I'm now a vagrant os image maintainer.) NOTE: you can create your own personal scripts in builder/versions/ ! (See the template.sh file there for more information.) --- .gitignore | 1 + builder/Makefile | 10 +++++----- builder/versions/template.sh | 13 +++++++++++++ vagrant/gluster/Vagrantfile | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100755 builder/versions/template.sh diff --git a/.gitignore b/.gitignore index 729179b..036d986 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ docs/ hacking/ rpmbuild/ screencasts/ +builder/versions/*.sh diff --git a/builder/Makefile b/builder/Makefile index 11d8286..8c4ab0f 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -29,9 +29,9 @@ BOX = $(VERSION).box SIZE = 40 #OUTPUT = /tmp/gluster #OUTPUT := $(shell pwd) -OUTPUT := $(shell echo ~/tmp/builder/gluster) -SERVER = 'download.gluster.org' -REMOTE_PATH = 'purpleidea/vagrant' +OUTPUT := $(shell echo ~/tmp/builder/$(VERSION)) +SERVER = 'user@host.example.org' +REMOTE_PATH = 'public_html/vagrant' all: box @@ -134,9 +134,9 @@ $(OUTPUT)/SHA256SUMS.asc: $(OUTPUT)/SHA256SUMS # upload to public server # NOTE: user downloads while file uploads are in progress don't cause problems! upload: $(OUTPUT)/$(BOX) $(OUTPUT)/SHA256SUMS $(OUTPUT)/SHA256SUMS.asc - if [ "`cat $(OUTPUT)/SHA256SUMS`" != "`ssh $(SERVER) 'cd $(REMOTE_PATH)/ && sha256sum $(BOX)'`" ]; then \ + if [ "`cat $(OUTPUT)/SHA256SUMS`" != "`ssh $(SERVER) 'cd $(REMOTE_PATH)/$(VERSION)/ && sha256sum $(BOX)'`" ]; then \ echo Running upload...; \ - scp -p $(OUTPUT)/{$(BOX),SHA256SUMS{,.asc}} $(SERVER):$(REMOTE_PATH)/; \ + scp -p $(OUTPUT)/{$(BOX),SHA256SUMS{,.asc}} $(SERVER):$(REMOTE_PATH)/$(VERSION)/; \ fi # this method works too, but always hits the server on every make call #upload: diff --git a/builder/versions/template.sh b/builder/versions/template.sh new file mode 100755 index 0000000..f78b02c --- /dev/null +++ b/builder/versions/template.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# to use this script, from its parent dir, run: ./versions/