nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch

31 lines
768 B
Diff
Raw Normal View History

diff --git a/ytfzf b/ytfzf
2021-03-25 09:09:45 +01:00
index f7871c7..179c836 100755
--- a/ytfzf
+++ b/ytfzf
2021-03-25 09:09:45 +01:00
@@ -829,23 +829,8 @@ send_notify () {
}
update_ytfzf () {
2021-03-25 09:09:45 +01:00
- local branch="$1"
- local 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
}
2021-03-25 09:09:45 +01:00
scrape_subscriptions () {