projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a tool that (semi)automatically created the API documentation
[oweals/openssl.git]
/
util
/
mkdir-p.pl
diff --git
a/util/mkdir-p.pl
b/util/mkdir-p.pl
index 2c003d6e8491369f9d49a6f0aff8fd0b3ac96849..e73d02b073bbf6171d300b1d66ca2be542dcf15a 100755
(executable)
--- a/
util/mkdir-p.pl
+++ b/
util/mkdir-p.pl
@@
-8,6
+8,7
@@
my $arg;
foreach $arg (@ARGV) {
my $arg;
foreach $arg (@ARGV) {
+ $arg =~ tr|\\|/|;
&do_mkdir_p($arg);
}
&do_mkdir_p($arg);
}
@@
-15,19
+16,19
@@
foreach $arg (@ARGV) {
sub do_mkdir_p {
local($dir) = @_;
sub do_mkdir_p {
local($dir) = @_;
- $dir =~ s|/*
$||
;
+ $dir =~ s|/*
\Z(?!\n)||s
;
if (-d $dir) {
return;
}
if (-d $dir) {
return;
}
- if ($dir =~
/\//
) {
+ if ($dir =~
m|[^/]/|s
) {
local($parent) = $dir;
local($parent) = $dir;
- $parent =~ s|[^/]*
$||
;
+ $parent =~ s|[^/]*
\Z(?!\n)||s
;
do_mkdir_p($parent);
}
mkdir($dir, 0777) || die "Cannot create directory $dir: $!\n";
do_mkdir_p($parent);
}
mkdir($dir, 0777) || die "Cannot create directory $dir: $!\n";
- print "created directory
$dir
\n";
+ print "created directory
`$dir'
\n";
}
}