diff --git a/ndk-pkg b/ndk-pkg index 5fa7505..5728d46 100755 --- a/ndk-pkg +++ b/ndk-pkg @@ -8686,13 +8686,19 @@ __setup() { ################################################################################## - TAR="$(command -v bsdtar || command -v gtar || command -v tar || true)" - XZ="$(command -v xz || true)" + BSDTAR="$(command -v bsdtar || true)" - if [ -z "$TAR" ] || [ -z "$XZ" ] ; then - wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/bsdtar-3.7.2-linux-x86_64.exe' -o bsdtar --no-buffer - chmod +x bsdtar - TAR=./bsdtar + if [ -n "$BSDTAR" ] ; then + TAR="$BSDTAR" + else + TAR="$(command -v gtar || command -v tar || true)" + XZ="$(command -v xz || true)" + + if [ -z "$TAR" ] || [ -z "$XZ" ] ; then + wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/bsdtar-3.7.2-linux-x86_64.exe' -o bsdtar --no-buffer + chmod +x bsdtar + TAR=./bsdtar + fi fi ##################################################################################