On Wed, 14 Mar 2018 07:21:38 +0100
Ansgar Burchardt <[email protected]> wrote:
> That doesn't work:
>
> +---
> | $ dash -c '[ -e /bin/* ]'
> | dash: 1: [: /bin/2to3-2.7: unexpected operator
> +---
Thanks for the catch, fixed version here.
diff --git a/debootstrap b/debootstrap
index a257e09..083473d 100755
--- a/debootstrap
+++ b/debootstrap
@@ -434,7 +434,7 @@ fi
###########################################################################
TARGET_EMPTY=true
-if [ -e "$TARGET"/* ]; then
+if [ "$(ls -A "$TARGET")" ]; then
TARGET_EMPTY=false
fi