forked from hewol/aerOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
21 lines (20 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.RECIPEPREFIX := $(.RECIPEPREFIX)
all: test-sudo
@echo "building ISO..."
@./build.sh
update: test-sudo
@rm -rf work
@echo "creating update package..."
@mkdir work work/fs
@7z e out/$$(ls -Art out | tail -n 1) -o./work arch/x86_64/airootfs.sfs
@unsquashfs -f -d ./work/fs ./work/airootfs.sfs
@( cd ./work/fs && rm -rf etc/fstab etc/passwd etc/shadow etc/hostname etc/calamares etc/sudoers etc/group etc/gdm/custom.conf etc/xdg/Trolltech.conf etc/xdg/autostart/calamares.desktop etc/sudoers.d/g_wheel etc/pacman.d/gnupg )
@( cd ./work/fs && rm -rf usr/bin/calamares usr/bin/calamares_polkit )
@( cd ./work/fs && rm -rf usr/lib/calamares usr/lib/libcalamares* usr/lib/initcpio/hooks/archiso* && rm -rf usr/lib/firmware )
@( cd ./work/fs && rm -rf var/lib/pacman/local )
@( cd ./work/fs && rm -rf boot dev home mnt proc root run srv sys tmp )
@sed -i 's/archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs //g' ./work/fs/etc/mkinitcpio.conf
@( cd ./work/fs && tar -cf - . | pv -s $$(du -sb . | awk -v OFMT='%d' '{ print $$1*1.02 }' | cut -f1) | gzip -9 > ../../out/update.tar.gz )
@rm -rf work
test-sudo:
@test $$UID = 0 || ( echo "error: must be root to do this."; false )