From b4a28a0906d121e5f78c7b21a4850923192f5064 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Sat, 12 Oct 2024 14:38:33 -0500 Subject: [PATCH] Update InstallDeps.sh Signed-off-by: Mark Suckerberg --- tools/tgs_scripts/InstallDeps.sh | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/tools/tgs_scripts/InstallDeps.sh b/tools/tgs_scripts/InstallDeps.sh index ce3a02a05147..c1009ce02367 100755 --- a/tools/tgs_scripts/InstallDeps.sh +++ b/tools/tgs_scripts/InstallDeps.sh @@ -7,7 +7,6 @@ has_cargo="$(command -v ~/.cargo/bin/cargo)" has_sudo="$(command -v sudo)" has_curl="$(command -v curl)" has_grep="$(command -v grep)" -has_youtubedl="$(command -v youtube-dl)" has_pip3="$(command -v pip3)" set -e set -x @@ -33,19 +32,14 @@ if ! [ -x "$has_cargo" ]; then . ~/.profile fi -# install or update youtube-dl when not present, or if it is present with pip3, -# which we assume was used to install it -if ! [ -x "$has_youtubedl" ]; then - echo "Installing youtube-dl with pip3..." - if ! [ -x "$has_sudo" ]; then - apt-get update - apt-get install -y python3 python3-pip - else - sudo apt-get update - sudo apt-get install -y python3 python3-pip - fi - pip3 install youtube-dl --break-system-packages -elif [ -x "$has_pip3" ]; then - echo "Ensuring youtube-dl is up-to-date with pip3..." - pip3 install youtube-dl -U --break-system-packages +# install or update yt-dlp when not present +echo "Installing/updating yt-dlp..." +if ! [ -x "$has_sudo" ]; then + apt-get update + apt-get install -y yt-dlp +else + sudo apt-get update + sudo apt-get install -y yt-dlp fi + +