#!/bin/sh
# "untarmailchunky" takes a an ordered list of mail messages (if they were in
# multiple parts, the must be fed to untarmail in order) and recreates
# the data stored by the original "tarmail" reversing each step along
# the way.
if test $# -ge 1; then
   sed '/^---end beef/,/^---start beef/d' $* | atob | uncompress | tar xvpf -
   echo remember to remove the tarmail files: $*
else
   sed '/^---end beef/,/^---start beef/d' | atob | uncompress | tar xvpf -
fi
