Changeset 631
- Timestamp:
- 06/01/07 18:20:02
(1 year ago)
- Author:
- DominoTree
- Message:
Removed dos linebreaks
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r469 |
r631 |
|
| 1 | 1 | #!/usr/bin/perl |
|---|
| 2 | | |
|---|
| 3 | 2 | use strict; |
|---|
| 4 | | |
|---|
| 5 | 3 | use warnings; |
|---|
| 6 | | |
|---|
| 7 | 4 | if (scalar(@ARGV) != 1) { |
|---|
| 8 | | |
|---|
| 9 | 5 | print STDERR "\nispcp-mkdirs.pl command line argument error !\n\n"; |
|---|
| 10 | | |
|---|
| 11 | 6 | exit 1; |
|---|
| 12 | | |
|---|
| 13 | 7 | } |
|---|
| 14 | | |
|---|
| 15 | 8 | my $dir_path = $ARGV[0]; |
|---|
| 16 | | |
|---|
| 17 | 9 | $dir_path .= "\n"; |
|---|
| 18 | | |
|---|
| 19 | 10 | my $current_dir = ''; |
|---|
| 20 | | |
|---|
| 21 | 11 | while ($dir_path =~ /(\/[^\/\n]+)/g) { |
|---|
| 22 | | |
|---|
| 23 | 12 | $current_dir .= $1; |
|---|
| 24 | | |
|---|
| 25 | 13 | if (! -e $current_dir) { |
|---|
| 26 | | |
|---|
| 27 | 14 | mkdir($current_dir); |
|---|
| 28 | | |
|---|
| 29 | 15 | print "Creating Directory [$current_dir] ...\n"; |
|---|
| 30 | | |
|---|
| 31 | 16 | } |
|---|
| 32 | 17 | } |
|---|
|
Download in other formats:
#########################################################################
# Site footer - Contents are automatically inserted after main Trac HTML
?>