mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-02-12 18:41:55 +00:00
27 lines
612 B
Makefile
27 lines
612 B
Makefile
|
.DEFAULT_GOAL := build
|
||
|
CONTAINER_NAME = unvr-nas:builder
|
||
|
|
||
|
setup:
|
||
|
sudo modprobe loop; \
|
||
|
sudo modprobe binfmt_misc
|
||
|
|
||
|
build: setup
|
||
|
@set -e; \
|
||
|
for file in `ls ./scripts/[0-99]*.sh`; \
|
||
|
do \
|
||
|
bash $${file}; \
|
||
|
done \
|
||
|
|
||
|
clean: mountclean
|
||
|
sudo rm -rf $(CURDIR)/BuildEnv; \
|
||
|
docker ps -a | awk '{ print $$1,$$2 }' | grep $(CONTAINER_NAME) | awk '{print $$1 }' | xargs -I {} docker rm {};
|
||
|
|
||
|
distclean: clean
|
||
|
docker rmi $(CONTAINER_NAME) -f; \
|
||
|
rm -rf $(CURDIR)/downloads $(CURDIR)/output
|
||
|
|
||
|
mountclean:
|
||
|
sudo umount $(CURDIR)/BuildEnv/rootfs/boot; \
|
||
|
sudo umount $(CURDIR)/BuildEnv/rootfs; \
|
||
|
sudo losetup -D
|