From: Paul Hänsch Date: Tue, 3 Jul 2018 13:27:56 +0000 (+0200) Subject: Merge branch 'master' of git.plutz.net:bootimage X-Git-Url: http://git.plutz.net/?p=bootimage;a=commitdiff_plain;h=77f5b92223ecc98fe0214598d16a3af19ee8a4bd;hp=0720c963f58d694e581c27d7e906b20bc31f1d00 Merge branch 'master' of git.plutz.net:bootimage --- diff --git a/Makefile b/Makefile index 493495c..8879c09 100644 --- a/Makefile +++ b/Makefile @@ -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/