Commit d13363af authored by Richard Levitte's avatar Richard Levitte
Browse files

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

PR: 81
parent b6fc2386
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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`") \

util/dirname.pl

0 → 100644
+18 −0
Original line number Diff line number Diff line
#!/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);