summarylogtreecommitdiffstats
path: root/hustmirror-cli.patch
blob: 400e2074a6a15a4288d4daf41b8b0adbb3de5d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From f654c3543e6cd9f54933968895f6e77f9edd4d11 Mon Sep 17 00:00:00 2001
From: TurtleRuss <tttturtleruss@gmail.com>
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