]> git.plutz.net Git - bootimage/commitdiff
fail conditions
authorroot <root@Zackserver.buero.zack.vuesch.org>
Thu, 28 Jun 2018 14:41:02 +0000 (16:41 +0200)
committerroot <root@Zackserver.buero.zack.vuesch.org>
Thu, 28 Jun 2018 14:41:02 +0000 (16:41 +0200)
Makefile

index 493495c952fc0f63778d4b7e68d675295d28b346..66ae46b0800dd6598ada0974a3eda955b37dd50f 100644 (file)
--- 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/