mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
28
Makefile
28
Makefile
@ -34,22 +34,22 @@ langs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
image:
|
image:
|
||||||
PACKER := /tmp/pwnagotchi/packer
|
PACKER := /tmp/pwnagotchi/packer
|
||||||
PACKER_URL := https://releases.hashicorp.com/packer/$(PACKER_VERSION)/packer_$(PACKER_VERSION)_linux_$(GOARCH).zip
|
PACKER_URL := https://releases.hashicorp.com/packer/$(PACKER_VERSION)/packer_$(PACKER_VERSION)_linux_$(GOARCH).zip
|
||||||
$(PACKER):
|
$(PACKER):
|
||||||
mkdir -p $(@D)
|
mkdir -p $(@D)
|
||||||
curl -L "$(PACKER_URL)" -o $(PACKER).zip
|
curl -L "$(PACKER_URL)" -o $(PACKER).zip
|
||||||
unzip $(PACKER).zip -d $(@D)
|
unzip $(PACKER).zip -d $(@D)
|
||||||
rm $(PACKER).zip
|
rm $(PACKER).zip
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
SDIST := dist/pwnagotchi-$(PWN_VERSION).tar.gz
|
SDIST := dist/pwnagotchi-$(PWN_VERSION).tar.gz
|
||||||
$(SDIST): setup.py pwnagotchi
|
$(SDIST): setup.py pwnagotchi
|
||||||
python3 setup.py sdist
|
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.
|
||||||
$(PWN_RELEASE).img: | $(PACKER)
|
$(PWN_RELEASE).img: | $(PACKER)
|
||||||
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
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- python3 setup.py clean --all
|
- python3 setup.py clean --all
|
||||||
|
Reference in New Issue
Block a user