diff --git a/build.sh b/build.sh index 0b6ac97..8008d7f 100644 --- a/build.sh +++ b/build.sh @@ -1,20 +1,22 @@ #! /bin/bash main() { - set -euo pipefail + set -eo pipefail d="$PWD" mkdir -p ./work.d cd ./work.d cleanup() { cd "$d" - rm -rf ./work.d || true + $DEBUG rm -rf ./work.d || true } trap cleanup EXIT - git clone \ - https://github.com/fe80Grau/ytdlp2STRM.git \ - --depth=1 + if [ ! -d ytdlp2STRM ]; then + git clone \ + https://github.com/fe80Grau/ytdlp2STRM.git \ + --depth=1 + fi } if [ "$0" == "$BASH_SOURCE" ]; then