Make files_before and files_after local.
This commit is contained in:
parent
eab91953eb
commit
a58b58a655
|
@ -56,7 +56,7 @@ function main()
|
||||||
[[ -z "${max_videos}" ]] && local max_videos="last"
|
[[ -z "${max_videos}" ]] && local max_videos="last"
|
||||||
|
|
||||||
mkdir -p "${download_dir}"
|
mkdir -p "${download_dir}"
|
||||||
files_before="$(find "${download_dir}" -type f)"
|
local files_before="$(find "${download_dir}" -type f)"
|
||||||
local -a feedlist=("${(@Q)${(z)$(read_feedlist)}}")
|
local -a feedlist=("${(@Q)${(z)$(read_feedlist)}}")
|
||||||
for feed in ${feedlist}; do
|
for feed in ${feedlist}; do
|
||||||
youtube-dl \
|
youtube-dl \
|
||||||
|
@ -69,7 +69,7 @@ function main()
|
||||||
"${feed}"
|
"${feed}"
|
||||||
# [[ ${?} -eq 0 ]] || die 3 "youtube-dl returned an error."
|
# [[ ${?} -eq 0 ]] || die 3 "youtube-dl returned an error."
|
||||||
done
|
done
|
||||||
files_after="$(find "${download_dir}" -type f)"
|
local files_after="$(find "${download_dir}" -type f)"
|
||||||
while read file; do
|
while read file; do
|
||||||
# https://stackoverflow.com/a/8811800/5965450
|
# https://stackoverflow.com/a/8811800/5965450
|
||||||
if [[ "${files_before#*${file}}" == "${files_before}" ]]; then
|
if [[ "${files_before#*${file}}" == "${files_before}" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue