summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2004-02-10 07:33:24 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2004-02-10 07:33:24 +0000
commitf8efd487d368e69cc5ee2e3e184c04032cdfd1e6 (patch)
treed3e94d759d111bc9c6aec06c2fdfc3f8779aef87
parent34b02e36f2c2b9436aecb84d1b2956db6c124910 (diff)
- sort options
- simplify SYNOPSIS - note that files are copied, not moved (from couderc@)
-rw-r--r--usr.bin/xinstall/install.151
-rw-r--r--usr.bin/xinstall/xinstall.c8
2 files changed, 26 insertions, 33 deletions
diff --git a/usr.bin/xinstall/install.1 b/usr.bin/xinstall/install.1
index 8b8da949a72..152d3230014 100644
--- a/usr.bin/xinstall/install.1
+++ b/usr.bin/xinstall/install.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: install.1,v 1.20 2004/02/06 22:21:10 jmc Exp $
+.\" $OpenBSD: install.1,v 1.21 2004/02/10 07:33:23 jmc Exp $
.\" $NetBSD: install.1,v 1.4 1994/11/14 04:57:17 jtc Exp $
.\"
.\" Copyright (c) 1987, 1990, 1993
@@ -38,39 +38,23 @@
.Nd install binaries
.Sh SYNOPSIS
.Nm install
-.Op Fl bCcpSs
+.Op Fl bCcdpSs
.Op Fl B Ar suffix
.Op Fl f Ar flags
.Op Fl g Ar group
.Op Fl m Ar mode
.Op Fl o Ar owner
-.Ar file1 file2
-.Nm install
-.Op Fl bCcpSs
-.Op Fl B Ar suffix
-.Op Fl f Ar flags
-.Op Fl g Ar group
-.Op Fl m Ar mode
-.Op Fl o Ar owner
-.Ar file1 ...
-.Ar fileN directory
-.Nm install
-.Fl d
-.Op Fl g Ar group
-.Op Fl m Ar mode
-.Op Fl o Ar owner
-.Ar directory ...
+.Ar source Op Ar ...
+.Ar target Op Ar ...
.Sh DESCRIPTION
-The file(s) are moved (or copied if the
-.Fl c
-option is specified) to the target file or directory.
-If the destination is a directory, then the
-.Ar file
-is moved into
-.Ar directory
-with its original filename.
-If the target file already exists, it is
-either renamed to
+The
+.Ar source
+file(s) are copied to the
+.Ar target
+file or directory.
+If the
+.Ar target
+file already exists, it is either renamed to
.Ar file.old
if the
.Fl b
@@ -80,6 +64,11 @@ if permissions allow.
An alternate backup suffix may be specified via the
.Fl B
option's argument.
+If the
+.Fl d
+option is given,
+.Ar target
+directories are created, and no files are copied.
.Pp
The options are as follows:
.Bl -tag -width "-B suffix"
@@ -109,6 +98,12 @@ option is only included for backwards compatibility.
.It Fl d
Create directories.
Missing parent directories are created as required.
+This option cannot be used with the
+.Fl B , b , C , c ,
+.Fl f , p , S ,
+or
+.Fl s
+options.
.It Fl f Ar flags
Specify the target's file
.Ar flags .
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index bc231e60040..f919bd95fec 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xinstall.c,v 1.39 2003/11/22 14:17:32 mickey Exp $ */
+/* $OpenBSD: xinstall.c,v 1.40 2004/02/10 07:33:23 jmc Exp $ */
/* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#endif
-static char rcsid[] = "$OpenBSD: xinstall.c,v 1.39 2003/11/22 14:17:32 mickey Exp $";
+static char rcsid[] = "$OpenBSD: xinstall.c,v 1.40 2004/02/10 07:33:23 jmc Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -601,9 +601,7 @@ void
usage(void)
{
(void)fprintf(stderr, "\
-usage: install [-bCcpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2\n\
- install [-bCcpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory\n\
- install -d [-g group] [-m mode] [-o owner] directory ...\n");
+usage: install [-bCcdpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner]\n source [...] target [...]\n");
exit(EX_USAGE);
/* NOTREACHED */
}