diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8626019 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/work.d diff --git a/build.sh b/build.sh index d0f6a0b..0b6ac97 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,22 @@ #! /bin/bash -date +main() { + set -euo pipefail -exit 0 + d="$PWD" + mkdir -p ./work.d + cd ./work.d + cleanup() { + cd "$d" + rm -rf ./work.d || true + } + trap cleanup EXIT + + git clone \ + https://github.com/fe80Grau/ytdlp2STRM.git \ + --depth=1 +} + +if [ "$0" == "$BASH_SOURCE" ]; then + main "$@" +fi