summary refs log tree commit diff
path: root/msetseq
blob: 03fb512f4903e49d7ff786090257d86357fd335d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh -e
# msetseq [-a] - store/append stdin as santoku seq (can be used as filter)

: ${MAILMAP:=~/.santoku/map}

if [ "$1" = -a ]; then
	cat ${MAILMAP} - >"${MAILMAP}-"
else
	cat >"${MAILMAP}-"
fi
mv "${MAILMAP}-" "${MAILMAP}"
[ -t 1 ] || cat "${MAILMAP}"