浏览代码

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
}



正在加载...
取消
保存