repo.or.cz
/
freebsd-src
/
fkvm-freebsd.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git]
/
crypto
/
openssl
/
util
/
dirname.pl
blob
d7a66d96accf22be920e8b263d61ee6af4b0e120
1
#!/usr/local/bin/perl
2
3
if
(
$#ARGV
<
0
) {
4
die
"dirname.pl: too few arguments
\n
"
;
5
}
elsif
(
$#ARGV
>
0
) {
6
die
"dirname.pl: too many arguments
\n
"
;
7
}
8
9
my
$d
=
$ARGV
[
0
];
10
11
if
(
$d
=~
m
|.*/.*|) {
12
$d
=~
s
|
/[^/
]*$||;
13
}
else
{
14
$d
=
"."
;
15
}
16
17
print
$d
,
"
\n
"
;
18
exit
(
0
);