mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-04 14:15:59 +00:00
Make consumedir-cleaner able to run on Windows
Since `bc` isn't available for Windows I changed it to use `expr`.
This commit is contained in:
parent
adbad2562a
commit
2855cf9828
@ -149,8 +149,7 @@ do
|
|||||||
rm "$tmp_filepath"
|
rm "$tmp_filepath"
|
||||||
else
|
else
|
||||||
created=$(echo $curl_result | $JQ_CMD -r ".items[0].created")
|
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')"
|
echo "... moving to archive by month added ('$cur_dir')"
|
||||||
mkdir -p "$cur_dir"
|
mkdir -p "$cur_dir"
|
||||||
mv "$tmp_filepath" "$cur_dir/"
|
mv "$tmp_filepath" "$cur_dir/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user