1
1
mirror of https://github.com/anthonyaxenov/iptv.git synced 2024-12-22 06:15:48 +00:00

Fixed download-all.sh

This commit is contained in:
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
/.vscode
/downloaded
downloaded/
/src/commit
/src/cache/*
/src/vendor

View File

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