Shell scripts for squeak on UNIX (was: Please use MIME attachments)
Scott A Crosby
crosby at qwes.math.cmu.edu
Wed May 1 02:22:02 UTC 2002
(CC'd back to the list because others may like the scripts)
On Wed, 1 May 2002, Richard A. O'Keefe wrote:
> I'm the same way.... I do all my email on this machine (over ssh) and all
> my squeak work on my machine. I use Pine to send, receive, and read
> emails... I SCP over any files I need, in both directions. And so far, I
> haven't had a problem.
>
> So how do you send change sets to this mailing list?
I scp them from my machine to the host that I do email on, then attach
them. (Its a lot nicer if you use SSH RSA authenticaation to auto-log-onto
the mail host from your squeak machine. :)
I've just made and tested an alias that does this for me.. ('sqmail'. Note
that it will probably fail if there's whitespace (or strange characters)
in filenames.)
> Pine can do attachments, but do you have to manually gzip the change sets?
>
I can... I usually don't.
If you want to gzip them, add something like:
ssh mailhost.foo.bar gzip ~/csSend/*.cs
to 'sqmail'... But you'll have to edit the part that makes the cut&paste
command if you want the output to still be cut&pasteable. (See below)
Then with one line:
sqmail foo.cs bar.cs Fulltext*.cs /foo/bar/*.cs
I automatically copy those changesets into a folder on the mail host, then
automatically echo a line I can cut&paste into Pine's 'Attachments' header
that will attach them from that directory. :)
``csSend/FullText-DemoAdaptors.1.cs, csSend/FullText-DemoAdaptors.2.cs,
csSend/FullText-DemoAdaptors.3.cs, csSend/FullText-Engines.1.cs,
csSend/FullText-Engines.2.cs, csSend/FullText-Engines.3.cs,
csSend/FullText-Engines.4.cs, csSend/FullText-Engines.5.cs,
csSend/FullText-Engines.6.cs'' (all one line, and ready to cut&paste)
--
I've also got a few other quick bash scripts.. For diff'ing changesets (to
see what changed, which is GREAT), and for viewing them with something
normal like 'less'.
Here are all 4:
sqless () {
tr \\015 \\n <"$1" | less
}
sqcat () {
tr \\015 \\n <"$1"
}
sqmail () {
scp -C -v $* qwe3.math.cmu.edu:csSend/
ls $* | sed '-es%^\(.*/\)%%' | sed '-es%^%csSend/%' \
| tr \\n \~ | sed -es/~/,\ \ /g
}
sqdiff () {
tr \\015 \\n <"$1" > /tmp/sq1
tr \\015 \\n <"$2" > /tmp/sq2
shift ; shift ;
diff $* /tmp/sq1 /tmp/sq2
}
These are all bash scripts and work fine for me.
--
The last can be used to pass extra options to diff:
sqdiff foo.1.cs foo.2.cs -y # for side-by-side comparison. :)
sqdiff foo.1.cs foo.2.cs -u # for context-aware diff to see what
# changed and the surrounding context.
sqdiff foo.1.cs foo.2.cs -U 8 # (same, but more context)
These are *really nice* when trying to compare changeset versions. Check
your local 'diff' manpage for the other goodies. :)
Scott
More information about the Squeak-dev
mailing list
|