Skip empty dir
This commit is contained in:
parent
c38ace8ab7
commit
e84bc9896e
1 changed files with 18 additions and 16 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
while read -r dir
|
||||
do
|
||||
if [ -n "${dir}" ]; then
|
||||
echo "Checking dir '${dir}'..."
|
||||
last_file="${dir}/$(ls -ht -- "${dir}/" | grep \.webm\.download_info\.json | head -n1)"
|
||||
if [ "${last_file}" == "${dir}/" ]; then
|
||||
|
@ -20,4 +21,5 @@ do
|
|||
touch -r "${last_file}" -- "${dir}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<< "$(find . -mindepth 1 -maxdepth 1 -type d)"
|
||||
|
|
Loading…
Reference in a new issue