599
|
1 |
# Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
# All rights reserved.
|
|
3 |
# This component and the accompanying materials are made available
|
|
4 |
# under the terms of "Eclipse Public License v1.0"
|
|
5 |
# which accompanies this distribution, and is available
|
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
#
|
|
8 |
# Initial Contributors:
|
|
9 |
# Nokia Corporation - initial contribution.
|
|
10 |
#
|
|
11 |
# Contributors:
|
|
12 |
#
|
|
13 |
# Description:
|
|
14 |
#
|
|
15 |
|
|
16 |
use File::Path;
|
|
17 |
|
|
18 |
|
|
19 |
# THE MAIN PROGRAM SECTION
|
|
20 |
{
|
|
21 |
unless (@ARGV) {
|
|
22 |
&Usage();
|
|
23 |
}
|
|
24 |
|
|
25 |
my $originalPath = join (' ',@ARGV);
|
|
26 |
print ("Creating $originalPath\n");
|
|
27 |
|
|
28 |
# temp change for old perl
|
|
29 |
foreach (@ARGV) {
|
|
30 |
s-\\-\/-go;
|
|
31 |
}
|
|
32 |
mkpath([@ARGV]);
|
|
33 |
foreach my $path (@ARGV) {
|
|
34 |
if (! -e $path) {
|
|
35 |
print ("ERROR: Couldn't create $path\n");
|
|
36 |
}
|
|
37 |
}
|
|
38 |
}
|
|
39 |
|
|
40 |
sub Usage () {
|
|
41 |
print <<ENDHERESTRING;
|
|
42 |
Usage : perl emkdir.pl list_of_directories
|
|
43 |
|
|
44 |
Creates the directories listed
|
|
45 |
ENDHERESTRING
|
|
46 |
|
|
47 |
exit 1;
|
|
48 |
}
|