annotate lisp/vm/mh-to-vm.sh @ 7:c153ca296910

Added tag r19-15b4 for changeset 27bc7f280385
author cvs
date Mon, 13 Aug 2007 08:47:16 +0200
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 #!/bin/sh
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 # Date: Thu, 9 Dec 93 18:23:56 -0500
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 # From: kyle@crystal.WonderWorks.com (Kyle Jones)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 # To: lipp@networx.com
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 # Cc: info-vm@uunet.uu.net
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 # Subject: Converting MH folders to VM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 # Damon Lipparelli writes:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 # > Does anyone have a way of converting MH folders to VM folders? I've just
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 # > switched to using VM and I don't want to have to re-mail myself all of my
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 # > old mail messages stored with MH to get them into VM folders.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 # If I remember correctly MH folders are just directories, with one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 # message per file. No UNIX From lines control-As or any of that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 # cruft. So you need to roll these messages into one file that VM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 # can handle. To get UNIX From style folders this script ought to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 # do it. Run it like this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 # % mh-to-vm.sh MH-folder-directory new-VM-folder-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 # It doesn't remove anything so if it doesn't work, then no harm done.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 source=$1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 dest=$2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 leader="From nobody `date`"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 trailer=""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 for message in $source/*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 echo $leader >> $dest
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 sed 's/^From />From /' < $message >> $dest
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 echo $trailer >> $dest
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 done
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 exit