From: root Date: Thu, 28 Jun 2018 14:41:02 +0000 (+0200) Subject: fail conditions X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=c4907be0dc514cbd8d3520c86b85c108426f2b45;p=bootimage fail conditions --- diff --git a/Makefile b/Makefile index 493495c..66ae46b 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 + [ -d "$@" ] && { btrfs subvolume delete "$@" || rm -r "$@"; } 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/