aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--misc/mmv/Makefile91
-rw-r--r--misc/mmv/distinfo3
-rw-r--r--misc/mmv/files/patch-aa98
-rw-r--r--misc/mmv/pkg-comment1
-rw-r--r--misc/mmv/pkg-descr12
-rw-r--r--misc/mmv/pkg-plist7
-rw-r--r--misc/mmv/scripts/unshar8
7 files changed, 220 insertions, 0 deletions
diff --git a/misc/mmv/Makefile b/misc/mmv/Makefile
new file mode 100644
index 000000000000..6b1c5272436f
--- /dev/null
+++ b/misc/mmv/Makefile
@@ -0,0 +1,91 @@
+# New ports collection makefile for: mmv
+# Version required: 1.01b
+# Date created: 2 Feb 1995
+# Whom: Michael Elbel (me)
+# Responsible: me@FreeBSD.org
+#
+# $Id$
+#
+
+# MASTER_SITES= ftp://gatekeeper.dec.com/archive/.b/usenet/comp.sources.unix/volume21/mmv
+# part01.Z
+# part02.Z
+# ftp://gatekeeper.dec.com/archive/.b/usenet/comp.sources.unix/volume22/mmv.pch.Z
+
+
+DISTNAME=mmv
+DISTDIR=${PORTSDIR}/distfiles/${DISTNAME}
+# MASTER_SITES=ftp://dodo/usr/me/tmp/
+MASTER_SITES=ftp://gatekeeper.dec.com/archive/.b/usenet/comp.sources.unix/
+
+DISTFILES= part01.Z part02.Z mmv.pch.Z
+SITE_DISTFILES= volume21/mmv/part01.Z volume21/mmv/part02.Z volume22/mmv.pch.Z
+
+NO_WRKSUBDIR=true
+
+# targets shamelessly hacked from the bsd.ports.mk file
+
+fetch: pre-fetch
+ @if [ ! -d ${DISTDIR} ]; then mkdir -p ${DISTDIR}; fi
+ @(cd ${DISTDIR}; \
+ for file in ${SITE_DISTFILES}; do \
+ if [ ! -f `basename $$file` ]; then \
+ echo ">> `basename $$file` doesn't seem to exist on this system."; \
+ echo ">> Attempting to fetch it from a master site."; \
+ for site in ${MASTER_SITES}; do \
+ pwd;\
+ if ${NCFTP} ${NCFTPFLAGS} $${site}$${file}; then \
+ break; \
+ fi \
+ done; \
+ if [ ! -f `basename $$file` ]; then \
+ echo ">> Couldn't fetch it - please try to retreive this";\
+ echo ">> port manually into ${DISTDIR} and try again."; \
+ exit 1; \
+ fi; \
+ fi \
+ done)
+
+extract: fetch work/.extract_done
+
+work/.extract_done:
+ @${MAKE} ${.MAKEFLAGS} checksum pre-extract
+ @echo "===> Extracting for ${DISTNAME}"
+ @rm -rf ${WRKDIR}
+ @mkdir -p ${WRKDIR}/tmp
+ @(cd ${DISTDIR} ; for file in ${DISTFILES}; do \
+ cp $$file ${WRKDIR}/tmp; \
+ done ; \
+ cd ${WRKDIR}/tmp; \
+ uncompress *; \
+ cd .. ; \
+ for file in tmp/part0* ; do \
+ ${SCRIPTDIR}/unshar $$file; \
+ done ; \
+ ${SCRIPTDIR}/makeitapatch tmp/mmv.pch ; \
+ mv tmp/mmv.pch ${PATCHDIR}/patch-0a ; \
+ cat mmv.c.? >mmv.c ; rm mmv.c.? )
+ ${TOUCH} ${TOUCH_FLAGS} ${EXTRACT_COOKIE}
+
+pre-extract:
+ chmod +x scripts/unshar scripts/makeitapatch
+
+install: build work/.install_done
+
+work/.install_done:
+ echo "===> Installing for ${DISTNAME}"
+ (if [ ! -d ${PREFIX}/bin ] ; then mkdir -p ${PREFIX}/bin ; fi ; \
+ cd ${PREFIX}/bin ; rm -f mmv mad mcp mln ; \
+ cd ${WRKSRC}; \
+ install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ mmv ${PREFIX}/bin ; \
+ ln ${PREFIX}/bin/mmv ${PREFIX}/bin/mad ; \
+ ln ${PREFIX}/bin/mmv ${PREFIX}/bin/mcp ; \
+ ln ${PREFIX}/bin/mmv ${PREFIX}/bin/mln ; \
+ if [ ! -f mmv.1.gz ] ; then gzip mmv.1 ; fi ; \
+ if [ ! -d ${PREFIX}/man/man1 ]; then mkdir -p ${PREFIX}/man/man1; fi; \
+ install ${COPY} -o ${BINOWN} -g ${BINGRP} \
+ mmv.1.gz ${PREFIX}/man/man1 ; )
+ @${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
+
+.include <bsd.port.mk>
diff --git a/misc/mmv/distinfo b/misc/mmv/distinfo
new file mode 100644
index 000000000000..7badeb989da1
--- /dev/null
+++ b/misc/mmv/distinfo
@@ -0,0 +1,3 @@
+MD5 (part01.Z) = 8844a88bbe189e280361136f25a589d4
+MD5 (part02.Z) = 9e01b9aaceaab18cb9efafa6dec5df81
+MD5 (mmv.pch.Z) = e6f8cb26c8966a82d6f3f26a6e4bee23
diff --git a/misc/mmv/files/patch-aa b/misc/mmv/files/patch-aa
new file mode 100644
index 000000000000..1d668147100a
--- /dev/null
+++ b/misc/mmv/files/patch-aa
@@ -0,0 +1,98 @@
+*** mmv.c.old Wed Mar 1 05:23:56 1995
+--- mmv.c Thu Mar 2 05:43:37 1995
+***************
+*** 88,94 ****
+ #endif
+
+ #include <stdio.h>
+- #include <ctype.h>
+
+ #ifdef MSDOS
+ /* for MS-DOS (under Turbo C 1.5)*/
+--- 88,93 ----
+***************
+*** 126,132 ****
+ #include <sys/file.h>
+
+ extern char *getenv();
+- extern long lseek();
+ extern char *malloc();
+
+ #ifdef DIRENT
+--- 125,130 ----
+***************
+*** 176,182 ****
+
+ #else
+ /* for System V and BSD */
+- #include <string.h>
+ #include <sys/signal.h>
+ #include <fcntl.h>
+ #endif
+--- 174,179 ----
+***************
+*** 370,376 ****
+ static int snap(/* REP *first, REP *p */);
+ static void showdone(/* REP *fin */);
+ static void breakout(/* */);
+! static int breakrep(/* */);
+ static void breakstat(/* */);
+ static void quit(/* */);
+ static int copymove(/* REP *p */);
+--- 367,373 ----
+ static int snap(/* REP *first, REP *p */);
+ static void showdone(/* REP *fin */);
+ static void breakout(/* */);
+! static void breakrep(/* */);
+ static void breakstat(/* */);
+ static void quit(/* */);
+ static int copymove(/* REP *p */);
+***************
+*** 389,395 ****
+ static int getstat(/* char *full, FILEINFO *f */);
+ static int dwritable(/* HANDLE *h */);
+ static int fwritable(/* char *hname, FILEINFO *f */);
+- static void memmove(/* void *to, void *from, int k */);
+ #endif
+ #ifndef RENAME
+ static int rename(/* char *from, char *to */);
+--- 386,391 ----
+***************
+*** 2550,2559 ****
+ }
+
+
+! static int breakrep()
+ {
+ gotsig = 1;
+- return(1);
+ }
+
+
+--- 2546,2554 ----
+ }
+
+
+! static void breakrep()
+ {
+ gotsig = 1;
+ }
+
+
+***************
+*** 2832,2838 ****
+ }
+
+
+! #ifndef MSDOS
+ static void memmove(to, from, k)
+ char *to, *from;
+ unsigned k;
+--- 2827,2833 ----
+ }
+
+
+! #if 0
+ static void memmove(to, from, k)
+ char *to, *from;
+ unsigned k;
diff --git a/misc/mmv/pkg-comment b/misc/mmv/pkg-comment
new file mode 100644
index 000000000000..d786068774d1
--- /dev/null
+++ b/misc/mmv/pkg-comment
@@ -0,0 +1 @@
+mmv - move/copy/append/link multiple files with sophisticated wildcard matching
diff --git a/misc/mmv/pkg-descr b/misc/mmv/pkg-descr
new file mode 100644
index 000000000000..45c14e846abd
--- /dev/null
+++ b/misc/mmv/pkg-descr
@@ -0,0 +1,12 @@
+This is mmv, a program to move/copy/append/link multiple files
+according to a set of wildcard patterns. The wildcard matches
+can be reused in forming the target names. You can i.e. move
+all *.c.or? files to or?.new.*.c by saying 'mmv "*.c.or?" or=2.new.=1.c'
+
+The multiple action is performed safely, i.e. without any unexpected
+deletion of files due to collisions of target names with existing
+filenames or with other target names. Furthermore, before doing
+anything, mmv attempts to detect any errors that would result from the
+entire set of actions specified and gives the user the choice of
+either aborting before beginning, or proceeding by avoiding the
+offending parts.
diff --git a/misc/mmv/pkg-plist b/misc/mmv/pkg-plist
new file mode 100644
index 000000000000..bd4a7ed9e87b
--- /dev/null
+++ b/misc/mmv/pkg-plist
@@ -0,0 +1,7 @@
+@cwd /usr/local/
+@cwd /a/me
+bin/mmv
+bin/mad
+bin/mcp
+bin/mln
+man/man1/mmv.1.gz
diff --git a/misc/mmv/scripts/unshar b/misc/mmv/scripts/unshar
new file mode 100644
index 000000000000..1a010af2aa41
--- /dev/null
+++ b/misc/mmv/scripts/unshar
@@ -0,0 +1,8 @@
+#!/bin/sh
+ed $1 <<XXXEOF
+/#! \/bin\/sh
+1,.-1d
+w
+q
+XXXEOF
+/bin/sh $1