From 4537d35666b9c23f82e9c5f2c0e838c09959906a Mon Sep 17 00:00:00 2001
From: Abin Simon <abinsimon10@gmail.com>
Date: Tue, 13 Mar 2018 10:25:21 +0530
Subject: MacOS fixes

fix adding new account in macos

Fix mailsync ping command

Fix mutt-wizard

Fix muttrc for mac

Add files for offlineimap_profile and offlineimap_header

Update README with MacOS install instructions
---
 etc/mailsync.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'etc')

diff --git a/etc/mailsync.sh b/etc/mailsync.sh
index 61eeade..4810ce7 100755
--- a/etc/mailsync.sh
+++ b/etc/mailsync.sh
@@ -7,8 +7,13 @@
 #
 # I have this run as a cronjob every 5 minutes.
 
-# Check for internet connection. Exit script if none.
-ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` >/dev/null || exit
+# Check for internet connection. Exit script if none. (timeout in mac is `-t`)
+if [ "$(uname)" == "Darwin" ]
+then
+	ping -q -t 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` >/dev/null || exit
+else
+	ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` >/dev/null || exit
+fi
 
 # Get current number of new mail, then begin sync.
 ori=$(find ~/.mail -wholename '*/new/*' | grep -vi "spam\|trash\|junk" | wc -l)
-- 
cgit v1.2.3