]> git.plutz.net Git - bootimage/commitdiff
Merge branch 'master' of git.plutz.net:bootimage
authorPaul Hänsch <paul@plutz.net>
Tue, 3 Jul 2018 13:27:56 +0000 (15:27 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 3 Jul 2018 13:27:56 +0000 (15:27 +0200)
Makefile

index 493495c952fc0f63778d4b7e68d675295d28b346..8879c09a942ac481e23aaf002b21301f9ca01037 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
+       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/