summaryrefslogtreecommitdiff
path: root/bin/movemymail
diff options
context:
space:
mode:
Diffstat (limited to 'bin/movemymail')
-rwxr-xr-xbin/movemymail6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/movemymail b/bin/movemymail
index 1b92e820..05527c35 100755
--- a/bin/movemymail
+++ b/bin/movemymail
@@ -7,6 +7,12 @@ if [ -e "$HOME/.nomovemymail" ]; then
exit 1
fi
+space=$(df -khP "$HOME/.fmail" | sed -e1d | awk '{ print $4 }')
+if ! [[ $space =~ G$ ]]; then
+ echo >&2 "free disc space is low; no movemymail"
+ exit 1
+fi
+
# if using notmuch on this machine, sync its database to maildir & git
if [ -f "$HOME/.fmail/.notmuch/xapian/iamglass" ]; then
mr -d "$HOME/lib/nmbug-spw" autoci