Skip to content

Commit

Permalink
Removing empty directories in rmlocal
Browse files Browse the repository at this point in the history
  • Loading branch information
madslundt authored Sep 9, 2017
1 parent a86ec6e commit e808fd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/rmlocal
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ rm_time () {
echo "[ $(date ${date_format}) ] Moving file -> ${n} to Google Drive."
"${rclone_bin}" move $rclone_options "$n" "${rclone_cloud_endpoint}${destpath}" >/dev/null 2>&1
done

find "${local_decrypt_dir}" -depth -type d -empty -delete
}

rm_space () {
Expand Down Expand Up @@ -90,7 +92,9 @@ rm_space () {
# Move file to remote destination[s], retaining path
echo "[ $(date ${date_format}) ] Moving file -> ${n} to Google Drive. Freeing up ${fileSizeGb} GB"
"${rclone_bin}" move $rclone_options "$n" "${rclone_cloud_endpoint}${destpath}" >/dev/null 2>&1
done
done

find "${local_decrypt_dir}" -depth -type d -empty -delete
}

# If script is already running; abort.
Expand Down

0 comments on commit e808fd5

Please sign in to comment.