Check /debootstrap exists before trying to remove

This commit is contained in:
Serge Schneider 2018-10-15 09:12:13 +01:00
parent 33e94c46f3
commit f8b629d6c7

View File

@ -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