瀏覽代碼

[togglecron] repair removing `sed`

I must have accidentally removed the comment (which is needed for removal of the section from the crontab file) before committing.
pull/680/head
Kriss 3 年之前
committed by GitHub
父節點
當前提交
12c4eca344
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      bin/mw

+ 3
- 1
bin/mw 查看文件

@@ -224,7 +224,8 @@ getboxes() { if [ -n "${force+x}" ] ; then
else
info="$(curl --location-trusted -s -m 5 --user "$login:$(pass "$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")"
[ -z "$info" ] && echo "Log-on not successful." && return 1
mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d ' ')"
mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '
')"
fi
[ "$type" = "pop" ] && mailboxes="INBOX"
getaccounts; for x in $(seq 1 9); do echo "$accounts" | grep -q "^$x:" || { export idnum="$x"; break ;}; done
@@ -275,6 +276,7 @@ togglecron() { cron="$(mktemp)"
else
echo "Adding automatic mailsync every ${cronmin:-10} minutes..."
cat <<EOF >>"$cron"
# mailsync
MBSYNCRC=${MBSYNCRC:-$HOME/.mbsynrc}
NOTMUCH_CONFIG=${NOTMUCH_CONFIG:-$HOME/.notmuch-config}
GNUPGHOME=${GNUPGHOME:-$HOME/.gnupg}


Loading…
取消
儲存