]> git.ipfire.org Git - thirdparty/openssl.git/blame - util/dirname.pl
More comment changes required for indent
[thirdparty/openssl.git] / util / dirname.pl
CommitLineData
d13363af
RL
1#!/usr/local/bin/perl
2
3if ($#ARGV < 0) {
4 die "dirname.pl: too few arguments\n";
5} elsif ($#ARGV > 0) {
6 die "dirname.pl: too many arguments\n";
7}
8
9my $d = $ARGV[0];
10
11if ($d =~ m|.*/.*|) {
12 $d =~ s|/[^/]*$||;
13} else {
14 $d = ".";
15}
16
17print $d,"\n";
18exit(0);