about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch
blob: e023914083d81f0a1c416e0a5b6585d9f793d2cb (plain) (blame)
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
diff --git a/ytfzf b/ytfzf
index d5ff8c9..96f9c8f 100755
--- a/ytfzf
+++ b/ytfzf
@@ -934,23 +934,8 @@ send_notify () {
 }
 
 update_ytfzf () {
-	branch="$1"
-	updatefile="/tmp/ytfzf-update"
-	curl -L "https://raw.githubusercontent.com/pystardust/ytfzf/$branch/ytfzf" -o "$updatefile"
-
-	if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh'; then
-		chmod 755 "$updatefile"
-		if [ "$(uname)" = "Darwin" ]; then
-			sudo cp "$updatefile" "/usr/local/bin/ytfzf"
-		else
-			sudo cp "$updatefile" "/usr/bin/ytfzf"
-		fi
-	else
-		printf "%bFailed to update ytfzf. Try again later.%b" "$c_red" "$c_reset"
-	fi
-
-	rm "$updatefile"
-	exit
+	printf "%bUpdates have to be installed through Nix.%b\n" "$c_red" "$c_reset"
+	exit 1
 }
 
 sort_video_data_date () {