21 lines
624 B
Makefile
21 lines
624 B
Makefile
UBUNTU_BOXES= precise quantal raring saucy trusty
|
|
TODAY=$(shell date -u +"%Y-%m-%d")
|
|
|
|
default:
|
|
|
|
all: $(UBUNTU_BOXES)
|
|
|
|
$(UBUNTU_BOXES): CONTAINER = "vagrant-lxc-base-${@}-amd64"
|
|
$(UBUNTU_BOXES): PACKAGE = "output/${TODAY}/vagrant-lxc-${@}-amd64.box"
|
|
$(UBUNTU_BOXES):
|
|
@mkdir -p $$(dirname $(PACKAGE))
|
|
@sudo -E ./mk-ubuntu.sh $(@) amd64 $(CONTAINER) $(PACKAGE)
|
|
@sudo chmod +rw $(PACKAGE)
|
|
@sudo chown ${USER}: $(PACKAGE)
|
|
|
|
clean:
|
|
@for r in $(UBUNTU_BOXES); do \
|
|
sudo -E ./clean.sh $${r}\
|
|
vagrant-lxc-base-$${r}-amd64 \
|
|
output/${TODAY}/vagrant-lxc-$${r}-amd64-${TODAY}.box; \
|
|
done
|