提交 d13363af 编写于 作者: R Richard Levitte

Make perl replacement for dirname, for system that lack the latter.

PR: 81
上级 b6fc2386
......@@ -732,7 +732,7 @@ install_docs:
fn=`basename $$i .pod`; \
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
(cd `dirname $$i`; \
(cd `$(PERL) util/dirname.pl $$i`; \
sh -c "`cd ../../util; ./pod2mantest ignore` \
--section=$$sec --center=OpenSSL \
--release=$(VERSION) `basename $$i`") \
......@@ -742,7 +742,7 @@ install_docs:
fn=`basename $$i .pod`; \
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
(cd `dirname $$i`; \
(cd `$(PERL) util/dirname.pl $$i`; \
sh -c "`cd ../../util; ./pod2mantest ignore` \
--section=$$sec --center=OpenSSL \
--release=$(VERSION) `basename $$i`") \
......
#!/usr/local/bin/perl
if ($#ARGV < 0) {
die "dirname.pl: too few arguments\n";
} elsif ($#ARGV > 0) {
die "dirname.pl: too many arguments\n";
}
my $d = $ARGV[0];
if ($d =~ m|.*/.*|) {
$d =~ s|/[^/]*$||;
} else {
$d = ".";
}
print $d,"\n";
exit(0);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册