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