Replace the shipped youtube-dl with the latest version at build time.

This is a temporary hack to get YouTube videos back working since many of them no longer resolve properly through youtube-dl.
develop
Icedream 2016-08-13 22:33:30 +02:00
parent 3a61d370a7
commit f2ec5cd9c8
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 5 additions and 2 deletions

View File

@ -33,8 +33,11 @@ rm ./ts3client.run
npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \
npm link --unsafe-perm ~app/src
# Fix for youtube-dl
chmod a+rx "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl"
# Replace the shipped youtube-dl with the latest version (this is a hack that will hopefully be fixed soon!)
wget -O/usr/local/bin/youtube-dl "https://yt-dl.org/downloads/latest/youtube-dl"
rm -f "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl"
ln -sf "/usr/local/bin/youtube-dl" "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl"
chmod a+rx "/usr/local/bin/youtube-dl"
# Clean up APT
apt-get autoremove -y --purge wget cmake cmake-data