]> jfr.im git - yt-dlp.git/commitdiff
Improve the yt-dlp.sh script (#248)
authorFelix S <redacted>
Sat, 17 Apr 2021 13:51:25 +0000 (15:51 +0200)
committerGitHub <redacted>
Sat, 17 Apr 2021 13:51:25 +0000 (19:21 +0530)
* Quote the `$0` variable to correctly handle spaces
* Change the shebang line to `/bin/sh` to avoid unnecessarily depending on bash
* Use the `exec` command to avoid having the shell process linger unnecessarily
* Change the mode to make the script directly executable

Authored by: fstirlitz

:ci skip all

yt-dlp.sh [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 97b86e0..71a9aa1
--- a/yt-dlp.sh
+++ b/yt-dlp.sh
@@ -1,2 +1,2 @@
-#!/bin/bash
-python3 "$(dirname $(realpath $0))/yt_dlp/__main__.py" "$@"
+#!/bin/sh
+exec python3 "$(dirname "$(realpath "$0")")/yt_dlp/__main__.py" "$@"