From 3004c1fdad329140ade1274760ae2ff6f4a329bb Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 11 Oct 2022 16:09:09 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/entrypoint-youtube-dl.sh | 10 ++++------ bin/ytda | 4 ++++ bin/ytdv | 4 ++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/entrypoint-youtube-dl.sh b/bin/entrypoint-youtube-dl.sh index fc6bd12..a0f88d6 100755 --- a/bin/entrypoint-youtube-dl.sh +++ b/bin/entrypoint-youtube-dl.sh @@ -18,18 +18,16 @@ # @@sudo/root : no # @@Template : other/docker-entrypoint # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ -n "$DEBUG" ] && set -x +set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - APPNAME="$(basename "$0" 2>/dev/null)" VERSION="202210071527-git" HOME="${USER_HOME:-$HOME}" USER="${SUDO_USER:-$USER}" RUN_USER="${SUDO_USER:-$USER}" SCRIPT_SRC_DIR="${BASH_SOURCE%/*}" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set bash options -[ "$1" == "--debug" ] && set -xo pipefail && export SCRIPT_OPTS="--debug" && export _DEBUG="on" -[ "$1" == "--raw" ] && export SHOW_RAW="true" -set -o pipefail - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set functions __version() { echo -e ${GREEN:-}"$VERSION"${NC:-}; } diff --git a/bin/ytda b/bin/ytda index e18b13c..dfd0d97 100644 --- a/bin/ytda +++ b/bin/ytda @@ -1,4 +1,8 @@ #!/usr/bin/env sh +# Set bash options +[ -n "$DEBUG" ] && set -x +set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - youtube-dl -f bestaudio --extract-audio --audio-format mp3 --embed-thumbnail --add-metadata --audio-quality 320k --config-location "$HOME/.config/youtube-dl/music" "$@" exit $? diff --git a/bin/ytdv b/bin/ytdv index 719d4df..6c3ea95 100644 --- a/bin/ytdv +++ b/bin/ytdv @@ -1,4 +1,8 @@ #!/usr/bin/env sh +# Set bash options +[ -n "$DEBUG" ] && set -x +set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - youtube-dl -f bestvideo+bestaudio --config-location "$HOME/.config/youtube-dl/video" "$@" exit $?