Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
Signed-off-by: leleliu008 <[email protected]>
  • Loading branch information
leleliu008 committed Mar 10, 2024
1 parent 8290365 commit ab55279
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
File renamed without changes.
24 changes: 11 additions & 13 deletions ndk-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -5368,7 +5368,7 @@ $DOT_CONTENT
do
run "$UPPM" install "$UPPM_PACKAGE_NAME"

UPPM_PACKAGE_INSTALLED_DIR="$("$UPPM" info "$UPPM_PACKAGE_NAME" installed-dir)"
UPPM_PACKAGE_INSTALLED_DIR="$("$UPPM" info-installed "$UPPM_PACKAGE_NAME" --prefix)"

if [ -d "$UPPM_PACKAGE_INSTALLED_DIR/bin" ] ; then
PATH="$UPPM_PACKAGE_INSTALLED_DIR/bin:$PATH"
Expand Down Expand Up @@ -5486,9 +5486,6 @@ $DOT_CONTENT
wfetch 'https://sh.rustup.rs' -o rustup-init.sh --no-buffer

run bash rustup-init.sh -y

export CARGO_HOME="$HOME/.cargo"
export PATH="$CARGO_HOME/bin:$PATH"
}
}

Expand Down Expand Up @@ -7994,12 +7991,12 @@ EOF
# https://github.com/microsoft/WSL/issues/8681
# https://github.com/microsoft/WSL/issues/4071
if [ "$NATIVE_OS_KIND" = linux ] && grep -q -i Microsoft /proc/version ; then
ANDROID_NDK_HOME="$("$UPPM" info "$UPPM_PACKAGE_NAME_NDK" installed-dir)"
ANDROID_NDK_HOME="$("$UPPM" info-installed "$UPPM_PACKAGE_NAME_NDK" --prefix)"
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-17"
fi
fi

ANDROID_NDK_HOME="$("$UPPM" info "$UPPM_PACKAGE_NAME_NDK" installed-dir)"
ANDROID_NDK_HOME="$("$UPPM" info-installed "$UPPM_PACKAGE_NAME_NDK" --prefix)"
else
ANDROID_NDK_HOME="$1"
fi
Expand Down Expand Up @@ -8069,10 +8066,11 @@ __setup() {
11) X='11.0' ;;
12) X='12.0' ;;
13) X='13.0' ;;
*) X='13.0' ;;
14) X='14.0' ;;
*) X='14.0' ;;
esac

UPPM_LATEST_RELEASE_ARCHIVE_FILENAME="uppm-${UPPM_LATEST_RELEASE_VERSION}-macos${X}-${NATIVE_OS_ARCH}.tar.xz"
UPPM_LATEST_RELEASE_ARCHIVE_FILENAME="uppm-${UPPM_LATEST_RELEASE_VERSION}-macos-${X}-${NATIVE_OS_ARCH}.tar.xz"
else
UPPM_LATEST_RELEASE_ARCHIVE_FILENAME="uppm-${UPPM_LATEST_RELEASE_VERSION}-${NATIVE_OS_KIND}-${NATIVE_OS_ARCH}.tar.xz"
fi
Expand Down Expand Up @@ -8100,7 +8098,7 @@ __setup() {
do
run bin/uppm install "$item"

UPPM_PACKAGE_INSTALLED_DIR="$(bin/uppm info "$item" installed-dir)"
UPPM_PACKAGE_INSTALLED_DIR="$(bin/uppm info-installed "$item" --prefix)"

if [ -d "$UPPM_PACKAGE_INSTALLED_DIR/bin" ] ; then
UPPM_PACKAGE_EXEFIND_PATH="$UPPM_PACKAGE_EXEFIND_PATH:$UPPM_PACKAGE_INSTALLED_DIR/bin"
Expand Down Expand Up @@ -9201,7 +9199,7 @@ main() {

NDKPKG="$CURRENT_SCRIPT_FILEPATH"

NDKPKG_VERSION=0.7.8
NDKPKG_VERSION=0.7.9

NDKPKG_ZSH_COMPLETION_SCRIPT_URL='https://raw.githubusercontent.com/leleliu008/ndk-pkg/master/ndk-pkg-zsh-completion'
NDKPKG_OFFICIAL_FORMULA_REPO_URL='https://github.com/leleliu008/ndk-pkg-formula-repository-official-core.git'
Expand Down Expand Up @@ -9309,11 +9307,11 @@ EOF
#########################################################################################

if [ -z "$CARGO_HOME" ] ; then
bppend_to_PATH "$HOME/.cargo/bin"
else
bppend_to_PATH "$CARGO_HOME/bin"
export CARGO_HOME="$HOME/.cargo"
fi

bppend_to_PATH "$CARGO_HOME/bin"

# pip install --user <PKG>
bppend_to_PATH "$HOME/.local/bin"

Expand Down

0 comments on commit ab55279

Please sign in to comment.