mirror of https://github.com/leahneukirchen/mblaze
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
349 B
Bash
19 lines
349 B
Bash
#!/bin/sh -e
|
|
# mopenall [MSG] - open every attachements in xdg-open
|
|
|
|
[ "$#" -eq 0 ] && set -- .
|
|
|
|
f="$(mseq "$1" | sed 1q)"
|
|
[ -z "$f" ] && printf 'No message %s.\n' "$1" 1>&2 && exit 1
|
|
|
|
dir=$(mktemp -d -t menter.XXXXXX)
|
|
cd "$dir"
|
|
mshow -t "$1"
|
|
mshow -B -x "$1" 2>/dev/null
|
|
for f in * ; do
|
|
xdg-open "$f" &
|
|
done
|
|
wait
|
|
echo rm -r "$dir"
|
|
rm -r "$dir"
|