depot/third_party/nixpkgs/pkgs/tools/misc/ytfzf/no-update.patch
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

29 lines
868 B
Diff

diff --git a/ytfzf b/ytfzf
index f4d2e0d..7a3b4b6 100755
--- a/ytfzf
+++ b/ytfzf
@@ -1260,22 +1260,8 @@ EOF
}
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"
- [ "$(uname)" = "Darwin" ] && prefix="/usr/local/bin" || prefix="/usr/bin"
- function_exists "sudo" && doasroot="sudo" || doasroot="doas"
- $doasroot cp "$updatefile" "$prefix/ytfzf"
- unset prefix doasroot
- else
- printf "%bFailed to update ytfzf. Try again later.%b" "$c_red" "$c_reset"
- fi
-
- rm "$updatefile"
- exit 0
+ printf "%bUpdates have to be installed through Nix.%b\n" "$c_red" "$c_reset"
+ exit 1
}
#gives a value to sort by (this will give the unix time the video was uploaded)