From 08ea9a313888f3bd4751e893638dcd2200f97326 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 24 May 2015 07:49:09 -0700 Subject: [PATCH] UTILS: move nfs-cp from examples to utils Signed-off-by: Ronnie Sahlberg --- doc/Makefile.am | 5 ++-- doc/nfs-cat.1.xml | 2 +- doc/nfs-cp.1 | 58 ++++++++++++++++++++++++++++++++++++ doc/nfs-cp.1.xml | 46 ++++++++++++++++++++++++++++ examples/Makefile.am | 2 +- packaging/RPM/libnfs.spec.in | 4 ++- utils/Makefile.am | 2 +- {examples => utils}/nfs-cp.c | 0 8 files changed, 113 insertions(+), 6 deletions(-) create mode 100644 doc/nfs-cp.1 create mode 100644 doc/nfs-cp.1.xml rename {examples => utils}/nfs-cp.c (100%) diff --git a/doc/Makefile.am b/doc/Makefile.am index cc0ad05..a87272d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,10 +1,11 @@ XSLTPROC = /usr/bin/xsltproc -EXTRA_DIST = nfs-cat.1 nfs-cat.1.xml nfs-ls.1 nfs-ls.1.xml +EXTRA_DIST = nfs-cat.1 nfs-cat.1.xml nfs-cp.1 nfs-cp.1.xml nfs-ls.1 nfs-ls.1.xml # Manpages -man1_MANS = nfs-cat.1 nfs-ls.1 +man1_MANS = nfs-cat.1 nfs-cp.1 nfs-ls.1 doc: -test -z "$(XSLTPROC)" || $(XSLTPROC) -o nfs-cat.1 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl nfs-cat.1.xml + -test -z "$(XSLTPROC)" || $(XSLTPROC) -o nfs-cp.1 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl nfs-cp.1.xml -test -z "$(XSLTPROC)" || $(XSLTPROC) -o nfs-ls.1 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl nfs-ls.1.xml diff --git a/doc/nfs-cat.1.xml b/doc/nfs-cat.1.xml index b60389f..907e9e0 100644 --- a/doc/nfs-cat.1.xml +++ b/doc/nfs-cat.1.xml @@ -1,5 +1,5 @@ - + nfs-cat diff --git a/doc/nfs-cp.1 b/doc/nfs-cp.1 new file mode 100644 index 0000000..795aa44 --- /dev/null +++ b/doc/nfs-cp.1 @@ -0,0 +1,58 @@ +'\" t +.\" Title: nfs-cp +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 05/24/2015 +.\" Manual: nfs-cp: copy files to/from an NFS share +.\" Source: nfs-cp +.\" Language: English +.\" +.TH "NFS\-CP" "1" "05/24/2015" "nfs\-cp" "nfs\-cp: copy files to/from an" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nfs-cp \- Utility to copy files to/from and NFS server +.SH "SYNOPSIS" +.HP \w'\fBnfs\-cp\ \ \fR\ 'u +\fBnfs\-cp \fR +.SH "DESCRIPTION" +.PP +nfs\-cp is a utility to copy files to/from and NFS server\&. +.PP +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ nfs\-cp foo\&.c nfs://127\&.0\&.0\&.1/data/tmp/foo\&.c + +$ nfs\-cp nfs://127\&.0\&.0\&.1/data/tmp/foo\&.c bob\&.c + +$ nfs\-cp nfs://127\&.0\&.0\&.1/data/tmp/foo\&.c nfs://127\&.0\&.0\&.1/data/tmp/copy\-of\-foo\&.c + +.fi +.if n \{\ +.RE +.\} +.sp +.SH "SEE ALSO" +.PP +\m[blue]\fB\%http://github.com/sahlberg/libnfs\fR\m[] diff --git a/doc/nfs-cp.1.xml b/doc/nfs-cp.1.xml new file mode 100644 index 0000000..7093527 --- /dev/null +++ b/doc/nfs-cp.1.xml @@ -0,0 +1,46 @@ + + + + + nfs-cp + 1 + nfs-cp + nfs-cp: copy files to/from an NFS share + + + + + nfs-cp + Utility to copy files to/from and NFS server + + + + + nfs-cp <src> <dst> + + + + + DESCRIPTION + + nfs-cp is a utility to copy files to/from and NFS server. + + + Examples: + +$ nfs-cp foo.c nfs://127.0.0.1/data/tmp/foo.c + +$ nfs-cp nfs://127.0.0.1/data/tmp/foo.c bob.c + +$ nfs-cp nfs://127.0.0.1/data/tmp/foo.c nfs://127.0.0.1/data/tmp/copy-of-foo.c + + + + + SEE ALSO + + + + + + diff --git a/examples/Makefile.am b/examples/Makefile.am index fdf9fbd..a1fa042 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,4 +1,4 @@ -noinst_PROGRAMS = nfsclient-async nfsclient-raw nfsclient-sync nfsclient-bcast nfsclient-listservers nfs-cp nfs-io portmap-client +noinst_PROGRAMS = nfsclient-async nfsclient-raw nfsclient-sync nfsclient-bcast nfsclient-listservers nfs-io portmap-client AM_CPPFLAGS = \ -I$(abs_top_srcdir)/include \ diff --git a/packaging/RPM/libnfs.spec.in b/packaging/RPM/libnfs.spec.in index 02c5fe8..93327e7 100644 --- a/packaging/RPM/libnfs.spec.in +++ b/packaging/RPM/libnfs.spec.in @@ -104,9 +104,11 @@ Utility programs for LibNFS %files utils %defattr(-,root,root) -%{_bindir}/nfs-ls %{_bindir}/nfs-cat +%{_bindir}/nfs-cp +%{_bindir}/nfs-ls %{_mandir}/man1/nfs-cat.1.gz +%{_mandir}/man1/nfs-cp.1.gz %{_mandir}/man1/nfs-ls.1.gz %changelog diff --git a/utils/Makefile.am b/utils/Makefile.am index b30b208..9148b6b 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS = nfs-cat nfs-ls +bin_PROGRAMS = nfs-cat nfs-cp nfs-ls AM_CPPFLAGS = \ -I$(abs_top_srcdir)/include \ diff --git a/examples/nfs-cp.c b/utils/nfs-cp.c similarity index 100% rename from examples/nfs-cp.c rename to utils/nfs-cp.c