Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Jan 29, 2025
1 parent 2369bd4 commit f081e54
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ndk-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -5947,6 +5947,7 @@ $DOT_CONTENT
[ "$PACKAGE_DEP_AUX_PERL" = 1 ] && TERMUX_PKGS="$TERMUX_PKGS perl"
[ "$PACKAGE_DEP_AUX_PYTHON3" = 1 ] && TERMUX_PKGS="$TERMUX_PKGS python"
[ "$PACKAGE_DEP_AUX_GOLANG" = 1 ] && TERMUX_PKGS="$TERMUX_PKGS golang"
[ "$PACKAGE_USE_BSYSTEM_CARGO" = 1 ] && TERMUX_PKGS="$TERMUX_PKGS rust"

if [ -n "$TERMUX_PKGS" ] ; then
step "install needed packages via pkg"
Expand Down Expand Up @@ -6093,7 +6094,7 @@ $DOT_CONTENT

#########################################################################################

[ "$PACKAGE_USE_BSYSTEM_CARGO" = 1 ] && {
[ "$PACKAGE_USE_BSYSTEM_CARGO" = 1 ] && [ "$TERMUX" != 1 ] && {
command -v rustup > /dev/null || {
# https://www.rust-lang.org/tools/install
note "${COLOR_GREEN}rustup cargo rustc${COLOR_OFF} ${COLOR_YELLOW}commands are required, but it was not found, let's install it.${COLOR_OFF}"
Expand Down Expand Up @@ -6161,7 +6162,9 @@ $DOT_CONTENT
}

[ "$PACKAGE_USE_BSYSTEM_CARGO" = 1 ] && {
[ "$TERMUX" = 1 ] ||
RUSTUP=$(command -v rustup) || abort 1 "command not found: rustup"

CARGO=$(command -v cargo) || abort 1 "command not found: cargo"
}

Expand Down Expand Up @@ -8046,7 +8049,7 @@ gow() {
}

cargow() {
run rustup target add "$RUST_TARGET"
[ "$TERMUX" = 1 ] || run rustup target add "$RUST_TARGET"

case $1 in
build)
Expand Down Expand Up @@ -9897,7 +9900,7 @@ fi
fi
}

NDKPKG_VERSION=0.20.10
NDKPKG_VERSION=0.20.11

NDKPKG_ARG0="$0"
NDKPKG_ARG1="$1"
Expand Down

0 comments on commit f081e54

Please sign in to comment.