|
Last change
on this file since aa42a9 was 5d30c1, checked in by Frederik Heber <heber@…>, 13 years ago |
|
Initial commit based on 3.0.0alpha (here claimed as 2.4).
|
-
Property mode
set to
100755
|
|
File size:
262 bytes
|
| Line | |
|---|
| 1 | #
|
|---|
| 2 | eval 'exec perl $0 $*'
|
|---|
| 3 | if 0;
|
|---|
| 4 |
|
|---|
| 5 | $path = shift;
|
|---|
| 6 | $newpath = rmdd($path);
|
|---|
| 7 |
|
|---|
| 8 | while ($path ne $newpath) {
|
|---|
| 9 | $path = $newpath;
|
|---|
| 10 | $newpath = rmdd($path);
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | print $newpath;
|
|---|
| 14 |
|
|---|
| 15 | sub rmdd {
|
|---|
| 16 | my $path = shift;
|
|---|
| 17 | $path =~ s/\/[^\/.]*\/\.\.//;
|
|---|
| 18 | return $path;
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.