2023-12-12 21:21:09 +01:00
// This is kind of useless since you can just do `./yt-dlp --update-to nightly` which I didn't know about when I wrote that.
2023-03-20 03:58:21 +01:00
import utils from './downloadutils.js' ;
2022-08-18 02:43:08 +02:00
2023-12-12 21:21:09 +01:00
( async ( ) => {
if ( process . platform !== 'linux' && process . argv [ 2 ] !== '-f' ) {
console . error ( 'This script only download the linux version of yt-dlp. If you want to download anyway try again with -f or execute ./bin/yt-dlp --update-to nightly' ) ;
process . exit ( 1 ) ;
}
else if ( process . platform !== 'linux' && process . argv [ 2 ] === '-f' ) {
console . log ( 'Executed with -f. Reminder that this script only download the linux version of yt-dlp.' ) ;
}
2022-08-18 02:43:08 +02:00
2023-12-12 21:21:09 +01:00
const downloadUrl = 'https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp' ;
2022-08-18 02:43:08 +02:00
2023-12-12 21:21:09 +01:00
await utils . download ( downloadUrl , './bin/yt-dlp' ) ;
} ) ;