equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 use File::Copy; |
|
18 |
|
19 # Form parameters |
|
20 # |
|
21 |
|
22 my $epocroot = $ENV{EPOCROOT}; |
|
23 my $srcfile = "dummy_bldvariant.hrh"; |
|
24 my $dstpath = $epocroot . "epoc32\\include\\oem"; |
|
25 my $dstfile = $dstpath . "\\bldvariant.hrh"; |
|
26 |
|
27 # Sanity checking |
|
28 # |
|
29 if (!-e $srcfile) |
|
30 { |
|
31 print STDERR "$srcfile does not exist\n"; |
|
32 exit 1; |
|
33 } |
|
34 |
|
35 # Perform copy if $dstfile does not exist |
|
36 # |
|
37 if (!-e $dstfile ) |
|
38 { |
|
39 # Create destination directory if it does not exist |
|
40 # |
|
41 if( !-d $dstpath ) |
|
42 { |
|
43 mkdir( $dstpath, 077 ); |
|
44 } |
|
45 # Copy file |
|
46 # |
|
47 if (!copy ($srcfile, $dstfile)) |
|
48 { |
|
49 print STDERR "Failed to copy file $dstfile\n"; |
|
50 unlink $dstfile; |
|
51 exit 1; |
|
52 } |
|
53 } |
|
54 |
|
55 # Done |
|
56 # |
|
57 exit 0; |