Skip to content

Commit 6402a1c

Browse files
fix debootstrap
1 parent 1e4cf5f commit 6402a1c

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

core/debootstrap/debootstrap

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ export PATH
1010

1111
###########################################################################
1212

13-
# if [ -z "$DEBOOTSTRAP_DIR" ]; then
14-
# if [ -x /debootstrap/debootstrap ]; then
15-
# DEBOOTSTRAP_DIR=/debootstrap
16-
# else
17-
# DEBOOTSTRAP_DIR=/usr/share/debootstrap
18-
# fi
19-
# fi
20-
DEBOOTSTRAP_DIR="core/debootstrap"
13+
if [ -d ../../core ]; then
14+
DEBOOTSTRAP_DIR="core/debootstrap"
15+
else
16+
if [ -z "$DEBOOTSTRAP_DIR" ]; then
17+
if [ -x /debootstrap/debootstrap ]; then
18+
DEBOOTSTRAP_DIR=/debootstrap
19+
else
20+
DEBOOTSTRAP_DIR=/usr/share/debootstrap
21+
fi
22+
fi
23+
fi
2124
. "$DEBOOTSTRAP_DIR/functions"
2225
exec 4>&1
2326

@@ -407,21 +410,21 @@ if [ $# != 0 ] ; then
407410
CERTIFICATE="--certificate=$2"
408411
shift 2
409412
elif [ "$1" != "${1#--certificate=}" ]; then
410-
CERTIFICATE="--certificate=${1#--certificate=}"
413+
CERTIFICATE="--certificate=${1#--certificate=}"
411414
shift 1
412415
else
413-
error 1 NEEDARG "option requires an argument %s" "$1"
416+
error 1 NEEDARG "option requires an argument %s" "$1"
414417
fi
415418
;;
416419
--private-key|--private-key=?*)
417420
if [ "$1" = "--private-key" ] && [ -n "$2" ]; then
418421
PRIVATEKEY="--private-key=$2"
419422
shift 2
420423
elif [ "$1" != "${1#--private-key=}" ]; then
421-
PRIVATEKEY="--private-key=${1#--private-key=}"
424+
PRIVATEKEY="--private-key=${1#--private-key=}"
422425
shift 1
423426
else
424-
error 1 NEEDARG "option requires an argument %s" "$1"
427+
error 1 NEEDARG "option requires an argument %s" "$1"
425428
fi
426429
;;
427430
--no-check-certificate)

0 commit comments

Comments
 (0)