From 044ae667f696441eb636e192ed165c62b2abe2ed Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Sun, 18 Mar 2018 09:39:06 +0530 Subject: [PATCH] Use `$HOME` instead of `/home/$(whoami)` In macOS home is `/Users/$(whoami)` --- mutt-wizard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt-wizard.sh b/mutt-wizard.sh index 076261a..295470c 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -19,7 +19,7 @@ chooseSync() { (crontab -l && testSync) || dialog --msgbox "No cronjob manager d testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;} addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-) - (crontab -l; echo "*/$min * * * * /home/$(whoami)/.config/mutt/etc/mailsync.sh") | crontab - && + (crontab -l; echo "*/$min * * * * $HOME/.config/mutt/etc/mailsync.sh") | crontab - && dialog --msgbox "Cronjob successfully added. Remember you may need to restart or tell systemd/etc. to start your cron manager for this to take effect." 7 60 ;} removeSync() { ((crontab -l | sed -e '/.config\/mutt\/etc\/mailsync/d') | crontab - >/dev/null) && dialog --msgbox "Cronjob successfully removed. To reactivate, select this option again." 6 60 ;}