Merge pull request #809 from JaCoB1123/patch-2

Make consumedir-cleaner able to run on Windows
This commit is contained in:
eikek 2021-05-17 13:39:18 +02:00 committed by GitHub
commit 7e0efd8ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,8 +149,7 @@ do
rm "$tmp_filepath"
else
created=$(echo $curl_result | $JQ_CMD -r ".items[0].created")
cur_dir="$ds_archive_path/$(date -d @$(echo "($created+500)/1000" | bc) +%Y-%m
)"
cur_dir="$ds_archive_path/$(date -d @$(expr \( $created + 500 \) / 1000) +%Y-%m)"
echo "... moving to archive by month added ('$cur_dir')"
mkdir -p "$cur_dir"
mv "$tmp_filepath" "$cur_dir/"