Просмотр исходного кода

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
Felix S 3 лет назад
Родитель
Сommit
155510fe81
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      yt-dlp.sh

+ 2 - 2
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" "$@"