author | Bob Rosenberg <bob.rosenberg@nokia.com> |
Tue, 26 Oct 2010 10:43:50 +0100 | |
changeset 8 | a2e65c705db8 |
parent 6 | 5b32dc297d05 |
permissions | -rw-r--r-- |
1
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
1 |
#!perl |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
2 |
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
3 |
# All rights reserved. |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
5 |
# under the terms of "Eclipse Public License v1.0" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
8 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
9 |
# Initial Contributors: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
10 |
# Nokia Corporation - initial contribution. |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
11 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
12 |
# Contributors: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
13 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
14 |
# Description: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
15 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
16 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
17 |
use strict; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
18 |
use warnings; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
19 |
use FindBin; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
20 |
use lib $FindBin::Bin; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
21 |
use lib $FindBin::Bin."/svg"; |
6
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
22 |
|
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
23 |
use lib $FindBin::Bin."/../.."; |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
24 |
use SysModelGen; |
1
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
25 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
26 |
use DrawSvg; |
6
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
27 |
my %versions = &DrawSvg::SchemaVersionsFromArgs(@ARGV); |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
28 |
my $drawer = new DrawSvg(); |
1
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
29 |
|
6
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
30 |
|
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
31 |
foreach my $v (grep /^3\./,keys(%versions)) |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
32 |
{ # need to downgrade anything in 3.x syntax |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
33 |
my $i=0; |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
34 |
foreach my $sys (@{$versions{$v}}) |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
35 |
{ |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
36 |
$i++; |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
37 |
$drawer->Downgrade($sys,"sysdef$i.xml"); |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
38 |
} |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
39 |
} |
5b32dc297d05
Prepare old system model generator for 2.0 update
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
1
diff
changeset
|
40 |
|
1
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
41 |
$drawer->Draw(); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
42 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
43 |
exit; |