-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdateytdlp.js
More file actions
17 lines (13 loc) · 762 Bytes
/
updateytdlp.js
File metadata and controls
17 lines (13 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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.
import utils from './downloadutils.js';
(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.');
}
const downloadUrl = 'https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp';
await utils.download(downloadUrl, './bin/yt-dlp');
});