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"
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user