瀏覽代碼

fix #730, sed only nl removal with error sup

tags/v3.3
Luke Smith 3 年之前
父節點
當前提交
f92000e5ed
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4C50B54A911F6252
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. +1
    -3
      bin/mw

+ 1
- 3
bin/mw 查看文件

@@ -172,10 +172,8 @@ delete() { if [ -z "${fulladdr+x}" ]; then
pass rm -f "$fulladdr" >/dev/null 2>&1
[ -n "${purge+x}" ] && rm -rf "${maildir:?}/${fulladdr:?}"

# Get rid of those multiple newlines because I don't know awk well enough to do it by default lol.
for file in "$msmtprc" "$mbsyncrc" "$mpoprc"; do
tr '\n' '|' 2>/dev/null < "$file" | sed "s/||\+/||/g" | tr '|' '\n' >> "$file"bu
mv -f "$file"bu "$file"
sed -ibu 'N;/^\n$/D;P;D;' "$file" 2>/dev/null; rm -f "$file"bu
done
}



Loading…
取消
儲存