diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch b/nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch new file mode 100644 index 000000000000..db7d4b40fccb --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch @@ -0,0 +1,30 @@ +diff --git a/ytfzf b/ytfzf +index 42f41c0..f75f5cb 100755 +--- a/ytfzf ++++ b/ytfzf +@@ -892,23 +892,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 + } + + scrape_subscriptions () { |