diff --git a/tur/rustc-nightly/build.sh b/tur/rustc-nightly/build.sh index 9dc55f283..856982aeb 100644 --- a/tur/rustc-nightly/build.sh +++ b/tur/rustc-nightly/build.sh @@ -46,15 +46,16 @@ termux_pkg_auto_update() { if [[ "${latest_version}" == "${TERMUX_PKG_VERSION}" ]]; then echo "INFO: No update needed. Already at version '${TERMUX_PKG_VERSION}'." + rm -rf ~/.cargo ~/.rustup return elif [ "$(echo "$latest_version $TERMUX_PKG_VERSION" | tr " " "\n" | sort -V | head -n 1)" == "$latest_version" ]; then echo "Error: It seems that rustc-nightly version $latest_version is withdrawed." + rm -rf ~/.cargo ~/.rustup exit 1 fi - - # termux_pkg_upgrade_version "$latest_version" - echo "INFO: latest_version: $latest_version" - exit 1 + + rm -rf ~/.cargo ~/.rustup + termux_pkg_upgrade_version "$latest_version" } termux_step_post_get_source() {