Fixed download-all.sh

master
Anthony Axenov 2022-10-22 16:45:58 +08:00
parent 4c18167d4a
commit 944fbdcfce
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
2 changed files with 15 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
/.idea /.idea
/.vscode /.vscode
/downloaded downloaded/
/src/commit /src/commit
/src/cache/* /src/cache/*
/src/vendor /src/vendor

View File

@ -16,7 +16,17 @@
# #
################################################# #################################################
rm -rf ./downloaded TOOLS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
mkdir -p ./downloaded && \ DL_DIR="$TOOLS_DIR/downloaded"
cd ./downloaded && \ ROOT_DIR="`dirname "$TOOLS_DIR"`"
grep -P "pls='(.*)'" ../playlists.ini | sed "s/^pls=//g" | sed "s/'//g" | tr -d '\r' | xargs wget INI_FILE="$ROOT_DIR/playlists.ini"
rm -rf "$DL_DIR" && \
mkdir -p "$DL_DIR" && \
cd "$DL_DIR" && \
cat "`dirname "$TOOLS_DIR"`/playlists.ini" \
| grep -P "pls\s*=\s*'(.*)'" \
| sed "s#^pls\s*=\s*##g" \
| sed "s#'##g" \
| tr -d '\r' \
| xargs wget