From 155510fe8191561b388c43fd5cc0ca57a68c3f99 Mon Sep 17 00:00:00 2001 From: Felix S Date: Sat, 17 Apr 2021 15:51:25 +0200 Subject: [PATCH] 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 --- yt-dlp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 yt-dlp.sh diff --git a/yt-dlp.sh b/yt-dlp.sh old mode 100644 new mode 100755 index 97b86e0f0..71a9aa163 --- 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" "$@"