diff options
author | Felix S <felix.von.s@posteo.de> | 2021-04-17 15:51:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-17 19:21:25 +0530 |
commit | 155510fe8191561b388c43fd5cc0ca57a68c3f99 (patch) | |
tree | 4531c7ebeff49bdc71dcf9eeca6121902184ed95 | |
parent | 201c1459535e25b88e76079ae3b9165c8f827a2a (diff) | |
download | hypervideo-pre-155510fe8191561b388c43fd5cc0ca57a68c3f99.tar.lz hypervideo-pre-155510fe8191561b388c43fd5cc0ca57a68c3f99.tar.xz hypervideo-pre-155510fe8191561b388c43fd5cc0ca57a68c3f99.zip |
Improve the yt-dlp.sh script (#248)
* 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
-rwxr-xr-x[-rw-r--r--] | yt-dlp.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt-dlp.sh b/yt-dlp.sh index 97b86e0f0..71a9aa163 100644..100755 --- 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" "$@" |