From f654c3543e6cd9f54933968895f6e77f9edd4d11 Mon Sep 17 00:00:00 2001 From: TurtleRuss Date: Sun, 17 Dec 2023 14:24:41 +0800 Subject: [PATCH] patch:core/install --- src/core.sh | 25 +------------------------ 1 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/core.sh b/src/core.sh index 91a0796..9975e15 100644 --- a/src/core.sh +++ b/src/core.sh @@ -121,30 +121,7 @@ set_mirror_recover_list() { # install hust-mirror install() { - install_path="/usr/local/bin" - if ! is_root; then - print_warning "Install hust-mirror to /usr/local/bin need root permission." - fi - install_target="$install_path/hustmirror-cli" - set_sudo - if [ ! -d "$install_path" ]; then - print_status "Creating directory: $install_path" - $sudo mkdir -p "$install_path" - fi - has_command curl || { - print_error "curl is required." - exit 1 - } - print_status "Downloading latest hust-mirror..." - $sudo curl -sSfL "${http}://${domain}/get" -o "$install_target" || { - print_error "Failed to download hustmirror-cli." - exit 1 - } - $sudo chmod +x "$install_target" - print_success "Successfully install hustmirror-cli." - $sudo ln -sf $install_target "$install_path/hustmirror" # make link for legacy name - has_command hustmirror-cli || print_warning "It seems /usr/local/bin is not in your path, try to add it to your PATH in ~/.bashrc or ~/.zshrc." - print_success "Now, you can use \`hustmirror-cli\` in your command line" + print_error "Use aur helper to update!" } # $1 software to recover -- 2.43.0