Use realpath for the case of running the script via symlink

This commit is contained in:
link2xt 2023-01-02 14:47:04 +00:00
parent 78aada7027
commit 2f8992a77c
2 changed files with 2 additions and 2 deletions

View file

@ -4,6 +4,6 @@
#
set -e
TARGETS="armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android"
RUSTUP_TOOLCHAIN=$(cat "$(dirname "$0")/rust-toolchain")
RUSTUP_TOOLCHAIN=$(cat "$(dirname $(realpath "$0"))/rust-toolchain")
rustup install "$RUSTUP_TOOLCHAIN"
rustup target add $TARGETS --toolchain "$RUSTUP_TOOLCHAIN"