acquires links from stdin, downloads with yt-dlp and then rsyncs to media folder
0
0
1
| 1 | #!/bin/sh |
| 2 | set -e |
| 3 | TMP_PATH=/tmp/yt-dl #$(mktemp -d) |
| 4 | mkdir $TMP_PATH || true |
| 5 | DEST=/mnt/hs2/main/media/storage/music/ |
| 6 | |
| 7 | # Exit if the temp directory wasn't created successfully. |
| 8 | if [ ! -e "$TMP_PATH" ]; then |
| 9 | >&2 echo "Failed to create temp directory" |
| 10 | exit 1 |