From 7bdd1965adc5a399313116f91cfe867111aa248f Mon Sep 17 00:00:00 2001 From: saicharankandukuri Date: Thu, 4 Apr 2024 12:05:32 +0530 Subject: [PATCH] feat: use custom folder for functions and debootstrap scripts to control distros sybolic links --- plugins/envsetup | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/envsetup b/plugins/envsetup index bf7a076..37dbe63 100755 --- a/plugins/envsetup +++ b/plugins/envsetup @@ -287,8 +287,12 @@ do_build() { export chroot_dir chroot_dir=$target_dir + if [[ ! $DEBOOTSTRAP_DIR ]]; then + export DEBOOTSTRAP_DIR="$ROOT_DIR/core/debootstrap-scripts" + fi + if [ -n "$SUITE" ]; then - supported_suites="$(ls "${ROOT_DIR}"/core/debootstrap/scripts)" + supported_suites="$(ls $DEBOOTSTRAP_DIR/scripts)" suite_found=false for sts in $supported_suites; do if [ "$sts" == "$SUITE" ]; then @@ -322,10 +326,6 @@ do_build() { _debootstrap=$(which debootstrap) fi - if ! $DEBOOTSTRAP_DIR; then - DEBOOTSTRAP_DIR="$ROOT_DIR/core/debootstrap" - fi - if [ "$BUILD_PLATFORM" == "termux" ]; then dpkg_depends_on debootstrap _debootstrap="$(which debootstrap)"