Make files_before and files_after local.

This commit is contained in:
tastytea 2020-12-16 21:21:20 +01:00
parent eab91953eb
commit a58b58a655
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ function main()
[[ -z "${max_videos}" ]] && local max_videos="last"
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)}}")
for feed in ${feedlist}; do
youtube-dl \
@ -69,7 +69,7 @@ function main()
"${feed}"
# [[ ${?} -eq 0 ]] || die 3 "youtube-dl returned an error."
done
files_after="$(find "${download_dir}" -type f)"
local files_after="$(find "${download_dir}" -type f)"
while read file; do
# https://stackoverflow.com/a/8811800/5965450
if [[ "${files_before#*${file}}" == "${files_before}" ]]; then