From 155ab56dceb237b491a9d551e2a74aa8d74a16c0 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 29 Mar 2012 22:51:59 +0200 Subject: [PATCH] Added wrapper mmhwrap for parallel installations with nmh or a small $PATH. It might be helpful. --- .gitignore | 1 + man/Makefile.in | 2 +- man/mmhwrap.man1 | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ uip/Makefile.in | 12 ++++++--- uip/mmhwrap.sh | 11 ++++++++ 5 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 man/mmhwrap.man1 create mode 100644 uip/mmhwrap.sh diff --git a/.gitignore b/.gitignore index d83d870..5c91101 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ /uip/mhstore /uip/mhtest /uip/mmh +/uip/mmhwrap /uip/msgchk /uip/msh /uip/new diff --git a/man/Makefile.in b/man/Makefile.in index 4703ebd..acd3072 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -50,7 +50,7 @@ SEDMAN = $(SED) -f man.sed $< > $@ # man pages to install in $(mandir)/$(manext1) MAN1SRC = ali. anno. burst. comp. dist. flist. flists. folder. folders. \ - forw. inc. mark. mhbuild. mhl. mhlist. mmh. \ + forw. inc. mark. mhbuild. mhl. mhlist. mmh. mmhwrap. \ mhmail. mhparam. mhpath. mhshow. mhstore. msgchk. new. fnext. \ fprev. unseen. next. packf. pick. prev. prompter. rcvdist. rcvpack. \ rcvstore. refile. repl. rmf. rmm. scan. send. sendfiles. \ diff --git a/man/mmhwrap.man1 b/man/mmhwrap.man1 new file mode 100644 index 0000000..488d2dc --- /dev/null +++ b/man/mmhwrap.man1 @@ -0,0 +1,79 @@ +.\" +.\" %nmhwarning% +.\" +.TH MMHWRAP %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] +.SH NAME +mmhwrap \- invoke mmh commands if they are not in $PATH +.SH SYNOPSIS +.HP 5 +.na +.B mmhwrap +.B command +.RB [ options ...] +.ad +.SH DESCRIPTION +.PP +Use +.B mmhwrap +if you want to invoke mmh programs without adding the mmh bindir +into $PATH, or if you want to install +.B nmh +and +.B mmh +both. +As their tools are equally named (but incompatibe) you can only +have one of both tool chests accessible through $PATH. +Use the wrapper to access +.B mmh +tools, if you have the +.B nmh +tools in your $PATH (first). +.PP +Copy +.B mmhwrap +into a directory that's part of $PATH, likely $HOME/bin or /usr/local/bin. +You likely want to rename +.B mmhwrap +to something shorter, like `m' for instance: +.PP +.RS 5 +.nf +cp %libdir%/mmhwrap $HOME/bin/m +chmod +x $HOME/bin/m +.fi +.RE +.PP +Then use it this way: +.PP +.RS 5 +.nf +% m folder +inbox+ has 162 messages (1\-177); cur=131; (others). + +% m scan \-help +Usage: scan [+folder] [msgs] [switches] + switches are: + \-form formatfile + \-width columns + \-(file) file + \-version + \-help + +% m scan f + 1 2012\-02\-13 To: meillo laber blubb + +% m refile l +foo +.fi +.RE + +.SH FILES +None + +.SH "PROFILE COMPONENTS" +None + +.SH CONTEXT +None + +.SH "SEE ALSO" +mmh\-intro(7) diff --git a/uip/Makefile.in b/uip/Makefile.in index 1f5a495..0ae3167 100644 --- a/uip/Makefile.in +++ b/uip/Makefile.in @@ -57,7 +57,7 @@ CMDS = ali anno burst comp dist flist folder forw mmh mark \ LCMDS = flists folders next prev fnext fprev unseen # misc support binaries -MISC = ap dp fmtdump mhtest +MISC = ap dp fmtdump mhtest mmhwrap # commands with 'S'pecial installation needs SCMDS = inc @@ -65,7 +65,7 @@ SCMDS = inc # source files SRCS = ali.c aliasbr.c anno.c ap.c burst.c comp.c \ dist.c distsbr.c dp.c dropsbr.c flist.c fmtdump.c \ - folder.c forw.c inc.c mmh.sh mark.c md5.c mhbuild.c \ + folder.c forw.c inc.c mark.c mmh.sh mmhwrap.sh md5.c mhbuild.c \ mhcachesbr.c mhfree.c mhl.c mhlist.c mhlistsbr.c \ mhmail.c mhmisc.c mhoutsbr.c mhparam.c mhparse.c \ mhpath.c mhshow.c mhshowsbr.c mhstore.c mhtest.c \ @@ -123,12 +123,16 @@ forw: forw.o whatnowproc.o $(LOCALLIBS) inc: inc.o scansbr.o termsbr.o $(LOCALLIBS) $(LINK) inc.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB) +mark: mark.o $(LOCALLIBS) + $(LINK) mark.o $(LINKLIBS) + mmh: mmh.sh cp $(srcdir)/mmh.sh mmh chmod +x mmh -mark: mark.o $(LOCALLIBS) - $(LINK) mark.o $(LINKLIBS) +mmhwrap: mmhwrap.sh + sed "s,%bindir%,"$(bindir)"," $(srcdir)/mmhwrap.sh >mmhwrap + chmod +x mmhwrap mhbuild: mhbuild.o mhcachesbr.o mhlistsbr.o mhoutsbr.o mhmisc.o mhfree.o mhparse.o termsbr.o md5.o $(LOCALLIBS) $(LINK) mhbuild.o mhcachesbr.o mhlistsbr.o mhoutsbr.o mhmisc.o mhfree.o mhparse.o md5.o $(LINKLIBS) $(TERMLIB) diff --git a/uip/mmhwrap.sh b/uip/mmhwrap.sh new file mode 100644 index 0000000..dfd308a --- /dev/null +++ b/uip/mmhwrap.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Wrapper for mmh commands +# +# For parallel installations of nmh and mmh. +# Removes the need to add /usr/local/mmh/bin to $PATH. +# +# Copy only this script into a $PATH directory. + +PATH="%bindir%:$PATH" +exec "$@" -- 1.7.10.4