Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/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);
|
|
|