X-Git-Url: http://git.plutz.net/?p=bootimage;a=blobdiff_plain;f=Makefile;h=8879c09a942ac481e23aaf002b21301f9ca01037;hp=2843f5dc8ed5259d3f70879d7aab1173844349ec;hb=9ff678e0eabd42da88178d2bdc91d394bb0f8a1e;hpb=e776978a99a27b790defdb0791757ea1d01ec350 diff --git a/Makefile b/Makefile index 2843f5d..8879c09 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ GROUPS := sudo ARCH := amd64 CONFIG := config_base/ -PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo syslinux syslinux-common syslinux-efi systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip +PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan efibootmgr firmware-linux-free gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo syslinux syslinux-common syslinux-efi systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip include *.mk @@ -35,13 +35,13 @@ stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} permissions .FORCE touch "$@" stretch_%_config/: stretch_%_root/ ${CONFIG} permissions .FORCE - btrfs subvolume delete "$@" || rm -r "$@" || true + if [ -d "$@" ]; then btrfs subvolume delete "$@" || rm -r "$@"; else true; fi btrfs subvolume snapshot "$<" "$@" || cp -rlv "$<" "$@" cp -av $(addsuffix /*, ${CONFIG}) "$@" -chroot "$@" locale-gen -chroot "$@" update-locale - chroot "$@" useradd -M -p "$$(printf %s\\n '${PASS}' |mkpasswd -m sha-256 -s)" '${USER}' - for g in ${GROUPS}; do chroot "$@" adduser '${USER}' "$$g"; done + -chroot "$@" useradd -M -p "$$(printf %s\\n '${PASS}' |mkpasswd -m sha-256 -s)" '${USER}' + -for g in ${GROUPS}; do chroot "$@" adduser '${USER}' "$$g"; done touch "$@" stretch_%.squashfs: stretch_%_config/ @@ -49,22 +49,31 @@ stretch_%.squashfs: stretch_%_config/ mksquashfs "$<" "$@" -comp xz vmlinuz: stretch_*_root/ - ln -s '$<$@' ./ + ln -fs '$<$@' ./ initrd.img: stretch_*_root/ - ln -s '$<$@' ./ + ln -fs '$<$@' ./ /dev/sd%: partitions .FORCE sfdisk ${@}