- playlists вызывается в download-all - download-all теперь вызывается в начале find-in-all и make-pls - мелочи по скриптам в целом
27 lines
814 B
Bash
Executable File
27 lines
814 B
Bash
Executable File
#!/bin/bash
|
|
#################################################
|
|
#
|
|
# IPTV channel finder (all playlists)
|
|
#
|
|
# Usage:
|
|
# ./find-in-all.sh "(disney|atv)"
|
|
#
|
|
# 1st argument is channel name pattern.
|
|
#
|
|
# Anthony Axenov (c) 2022
|
|
# The MIT License:
|
|
# https://git.axenov.dev/IPTV/tools/src/branch/master/LICENSE
|
|
#
|
|
#################################################
|
|
|
|
|
|
TOOLS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
|
|
$TOOLS_DIR/download-all.sh
|
|
|
|
DL_DIR="$TOOLS_DIR/downloaded"
|
|
[ ! -d "$DL_DIR" ] && echo "Error: '$DL_DIR' directory does not exist. Run ./download-all.sh" && exit 1
|
|
[ ! "$(ls -A "$DL_DIR")" ] && echo "Error: '$DL_DIR' directory is empty. Run ./download-all.sh" && exit 2
|
|
for file in $TOOLS_DIR/downloaded/*; do
|
|
$TOOLS_DIR/find-in-pls.sh "$1" "$file"
|
|
done
|