.PHONY: local
local:createLocal iso clean
	sudo mv ISO/out/archlinux*.iso local.iso
	sudo rm -rf ISO/out
	sudo chown $(USER) local.iso

.PHONY: remote
remote: createRemote iso clean
	sudo mv ISO/out/archlinux*.iso remote.iso
	sudo rm -rf ISO/out
	sudo chown $(USER) remote.iso

.PHONY: iso
iso:
	-rm -rf ISO/airootfs/root/testsetup
	mkdir ISO/airootfs/root/testsetup
	cp -r run.sh ISO/airootfs/root/testsetup/
	-rm -rf PoC/blacksmith/build/*
	cp -r PoC ISO/airootfs/root/testsetup/
	cp -r Scripts ISO/airootfs/root/testsetup/
	cd ISO && sudo mkarchiso -v ./
	rm -rf ISO/airootfs

.PHONY: createLocal
createLocal:
	cp -r ISO/localroot ISO/airootfs

.PHONY: createRemote
createRemote:
	cp -r ISO/remoteroot ISO/airootfs

.PHONY: clean
clean:
	-sudo rm -rf ISO/work
