update Makefile

This commit is contained in:
Jeroen Oudshoorn
2024-02-09 13:01:47 +01:00
parent ca4feb895e
commit a7634a2b4a

View File

@ -48,11 +48,15 @@ $(PACKER):
rm $(PACKER).zip rm $(PACKER).zip
chmod +x $@ chmod +x $@
SDIST := dist/pwnagotchi-$(PWN_VERSION).tar.gz
$(SDIST): setup.py pwnagotchi
python3 setup.py sdist
# Building the image requires packer, but don't rebuild the image just because packer updated. # Building the image requires packer, but don't rebuild the image just because packer updated.
pwnagotchi: | $(PACKER) pwnagotchi: | $(PACKER)
# If the packer or ansible files are updated, rebuild the image. # If the packer or ansible files are updated, rebuild the image.
pwnagotchi: builder/pwnagotchi.json.pkr.hcl builder/raspberrypi64.yml $(shell find builder/data -type f) pwnagotchi: $(SDIST) builder/pwnagotchi.json.pkr.hcl builder/raspberrypi64.yml $(shell find builder/data -type f)
cd builder && $(PACKER) init pwnagotchi.json.pkr.hcl && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json.pkr.hcl cd builder && $(PACKER) init pwnagotchi.json.pkr.hcl && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json.pkr.hcl