Index: ossp-pkg/shtool/ChangeLog
RCS File: /v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v
rcsdiff -q -kk '-r1.174' '-r1.175' -u '/v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v' 2>/dev/null
--- ChangeLog 2002/11/02 12:35:56 1.174
+++ ChangeLog 2002/11/02 12:46:19 1.175
@@ -11,6 +11,11 @@
Changes between 1.6.1 and 1.6.2 (12-Jul-2002 to xx-Oct-2002):
+ *) Map "shtool install -d
[...]" internally to "shtool mkdir
+ -f -p -m 755 [...]" in order to support the BSD-style
+ "install -d" variant.
+ [Ralf S. Engelschall, Alan Eldridge ]
+
*) Add -o|--owner and -g|--group options to "shtool mkdir".
[Ralf S. Engelschall]
Index: ossp-pkg/shtool/sh.install
RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.install,v
rcsdiff -q -kk '-r1.24' '-r1.25' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.install,v' 2>/dev/null
--- sh.install 2001/12/31 15:06:04 1.24
+++ sh.install 2002/11/02 12:46:19 1.25
@@ -20,12 +20,13 @@
##
str_tool="install"
-str_usage="[-v|--verbose] [-t|--trace] [-c|--copy] [-C|--compare-copy] [-s|--strip] [-m|--mode ] [-o|--owner ] [-g|--group ] [-e|--exec ] [ ...] "
-arg_spec="2+"
-opt_spec="v.t.c.C.s.m:o:g:e+"
-opt_alias="v:verbose,t:trace,c:copy,C:compare-copy,s:strip,m:mode,o:owner,g:group,e:exec"
+str_usage="[-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy] [-C|--compare-copy] [-s|--strip] [-m|--mode ] [-o|--owner ] [-g|--group ] [-e|--exec ] [ ...] "
+arg_spec="1+"
+opt_spec="v.t.d.c.C.s.m:o:g:e+"
+opt_alias="v:verbose,t:trace,d:mkdir,c:copy,C:compare-copy,s:strip,m:mode,o:owner,g:group,e:exec"
opt_v=no
opt_t=no
+opt_d=no
opt_c=no
opt_C=no
opt_s=no
@@ -36,6 +37,28 @@
. ./sh.common
+# special case: "shtool install -d [...]" internally
+# maps to "shtool mkdir -f -p -m 755 [...]"
+if [ "$opt_d" = yes ]; then
+ cmd="$0 mkdir -f -p -m 755"
+ if [ ".$opt_o" != . ]; then
+ cmd="$cmd -o '$opt_o'"
+ fi
+ if [ ".$opt_g" != . ]; then
+ cmd="$cmd -g '$opt_g'"
+ fi
+ if [ ".$opt_v" = .yes ]; then
+ cmd="$cmd -v"
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ cmd="$cmd -t"
+ fi
+ for dir in "$@"; do
+ eval "$cmd $dir" || exit $?
+ done
+ exit 0
+fi
+
# determine source(s) and destination
argc=$#
srcs=""
Index: ossp-pkg/shtool/shtool.pod
RCS File: /v/ossp/cvs/ossp-pkg/shtool/shtool.pod,v
rcsdiff -q -kk '-r1.60' '-r1.61' -u '/v/ossp/cvs/ossp-pkg/shtool/shtool.pod,v' 2>/dev/null
--- shtool.pod 2002/11/02 12:35:56 1.60
+++ shtool.pod 2002/11/02 12:46:19 1.61
@@ -414,7 +414,7 @@
lex scanner.l
shtool move -t -p lex.yy.c scanner.c
-=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] [B<-c>|B<--copy>] [B<-C>|B<--compare-copy>] [B<-s>|B<--strip>] [B<-m>|B<--mode> I] [B<-o>|B<--owner> I] [B<-g>|B<--group> I] [B<-e>|B<--exec> I] I I
+=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] [B<-c>|B<--copy>] [B<-C>|B<--compare-copy>] [B<-s>|B<--strip>] [B<-m>|B<--mode> I] [B<-o>|B<--owner> I] [B<-g>|B<--group> I] [B<-e>|B<--exec> I] [B<-d>|B<--mkdir>] I I
This command installs a program, script or datafile (dependent on I) in
a portable way while providing all important options of the BSD install(1)
@@ -434,7 +434,9 @@
the output of the essential shell commands which are executed.
The trick of this command is that it provides the functionality of BSD
-install(1) in a portable emulated way.
+install(1) in a portable emulated way. For even more compatibility,
+the BSD "B C" usage is internally mapped to the
+"B C" command.
Example: