ossp-pkg/shtool/sh.mkdir 1.23 -> 1.24
--- sh.mkdir 2004/01/01 16:54:20 1.23
+++ sh.mkdir 2004/02/12 16:06:27 1.24
@@ -1,8 +1,6 @@
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-2004 Ralf S. Engelschall <rse@engelschall.com>
-## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
-## Cleaned up and enhanced for shtool
##
## This file is part of shtool and free software; you can redistribute
## it and/or modify it under the terms of the GNU General Public
@@ -112,5 +110,96 @@
done
fi
done
+
shtool_exit $errstatus
+##
+## manual page
+##
+
+=pod
+
+=head1 NAME
+
+B<shtool mkdir> - B<GNU shtool> mkdir(1) style command
+
+=head1 SYNOPSIS
+
+B<shtool mkdir>
+[B<-t>|B<--trace>]
+[B<-f>|B<--force>]
+[B<-p>|B<--parents>]
+[B<-m>|B<--mode> I<mode>]
+[B<-o>|B<--owner> I<owner>]
+[B<-g>|B<--group> I<group>]
+I<dir> [I<dir> ...]
+
+=head1 DESCRIPTION
+
+This is a mkdir(1) style command with additional options and the ability
+to be smart if the directory already exists which is important for
+installation procedures.
+
+=head1 OPTIONS
+
+The following command line options are available.
+
+=over 4
+
+=item B<-t>, B<--trace>
+
+Shows the actually involved shell commands.
+
+=item B<-f>, B<--force>
+
+Forced continuation and no complaints if directory already exists.
+Default is to terminate with error.
+
+=item B<-p>, B<--parents>
+
+Automatic parent directory creation. Default is to only create the last
+directory in the path and fail if parents are missing.
+
+=item B<-m>, B<--mode> I<mode>
+
+The directory mode applied to the directory, see chmod(1). Omitting mode
+skips this step and leaves the operating system default which is usually
+based on umask(1). Some directory modes require superuser privileges to
+be set. Default is to stick with operating system defaults.
+
+=item B<-o>, B<--owner> I<owner>
+
+The directory owner name or id applied to the directory, see chown(1).
+This option requires superuser privileges to execute. Default is to skip
+this step and leave the operating system default which is usually based
+on the executing uid or the parent setuid directory.
+
+=item B<-g>, B<--group> I<group>
+
+The directory group name or id applied to the directory, see chgrp(1). This
+option requires superuser privileges to execute to the fullest extend,
+otherwise the choice of I<group> is limited on most operating systems.
+Default is to skip this step and leave the operating system default
+which is usually based on the executing gid or the parent setgid
+directory.
+
+=head1 EXAMPLE
+
+ # Makefile
+ install:
+ shtool mkdir -f -p -m 755 $(bindir)
+ shtool mkdir -f -p -m 755 $(mandir)/man1
+ :
+
+=head1 HISTORY
+
+The B<GNU shtool> B<mkdir> command was originally written for Public
+Domain by Noah Friedman and later revised by Ralf S. Engelschall
+E<lt>rse@engelschall.comE<gt> in 1999 for inclusion into B<GNU shtool>.
+
+=head1 SEE ALSO
+
+shtool(1), mkdir(1).
+
+=cut
+
|
|