From f8b629d6c7a3aec33edb3e0a60231e431eeaa8b7 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 15 Oct 2018 09:12:13 +0100 Subject: [PATCH] Check /debootstrap exists before trying to remove --- scripts/common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/common b/scripts/common index f3b5950..ad095b8 100644 --- a/scripts/common +++ b/scripts/common @@ -19,7 +19,9 @@ bootstrap(){ --arch armhf \ --keyring "${STAGE_DIR}/files/raspberrypi.gpg" \ "$1" "$2" "$3" || true - rmdir "$2/debootstrap" + if [ -d "$2/debootstrap" ]; then + rmdir "$2/debootstrap" + fi } export -f bootstrap