瀏覽代碼

tmpfile now unique now unique

tags/v3.1
Luke Smith 6 年之前
父節點
當前提交
26adb70a24
共有 1 個檔案被更改,包括 8 行新增7 行删除
  1. +8
    -7
      mutt-wizard.sh

+ 8
- 7
mutt-wizard.sh 查看文件

@@ -9,13 +9,14 @@ fi

muttdir="$HOME/.config/mutt/"

createMailboxes() { rm -f /tmp/log /tmp/lognew
offlineimap --info -a $1 2&> /tmp/log
sed -n '/^Folderlist/,/^Folderlist/p' /tmp/log |
grep "^ " | sed -e "s/\//./g;s/(.*//g;s/^ //g" > /tmp/lognew
while read box; do mkdir -p "$HOME/.mail/$1/$box"; done </tmp/lognew ;}

chooseSync() { (crontab -l && testSync) || dialog --msgbox "No cronjob manager detected. Please install one and return to enable automatic mailsyncing" 10 60 ;}
createMailboxes() { \
tmpdir=$(mktemp -d)
offlineimap --info -a $1 2&> "$tmpdir"/log
sed -n '/^Folderlist/,/^Folderlist/p' "$tmpdir"/log |
grep "^ " | sed -e "s/\//./g;s/(.*//g;s/^ //g" > "$tmpdir"/lognew
while read box; do mkdir -p "$HOME/.mail/$1/$box"; done <"$tmpdir"/lognew ;}

chooseSync() { (cat /var/run/crond.pid && testSync) || dialog --msgbox "No cronjob manager detected. Please install one and return to enable automatic mailsyncing" 10 60 ;}
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>&-)


Loading…
取消
儲存