mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-13 07:10:26 +00:00
14 lines
303 B
Bash
Executable File
14 lines
303 B
Bash
Executable File
#!/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}.old" || true
|
|
mv "${MAILMAP}-" "${MAILMAP}"
|
|
[ -t 1 ] || cat "${MAILMAP}"
|