Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
taste-setup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
taste-setup
Commits
9bd2f124
Commit
9bd2f124
authored
Jun 30, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use proper formatting in taste-update-data-view
parent
41cf2871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
misc/helper-scripts/taste-update-data-view
misc/helper-scripts/taste-update-data-view
+26
-11
No files found.
misc/helper-scripts/taste-update-data-view
View file @
9bd2f124
...
...
@@ -2,6 +2,19 @@
echo
TASTE Data View Convertor - From ASN.1 to AADLV2
if
[
-t
0
]
;
then
COLORON
=
"
\e
[1m
\e
[32m"
REDCOLORON
=
"
\e
[1m
\e
[31m"
COLOROFF
=
"
\e
[0m"
else
COLORON
=
""
REDCOLORON
=
""
COLOROFF
=
""
fi
INFO
=
"
${
COLORON
}
[INFO]
${
COLOROFF
}
"
ERROR
=
"
${
REDCOLORON
}
[ERROR]
${
COLOROFF
}
"
# User may pass several ASN.1 files as parameters
for
f
in
$@
do
...
...
@@ -11,16 +24,16 @@ do
then
if
[
!
-f
"
$f
"
]
then
echo
File not found:
$f
echo
-e
"
${
INFO
}
File not found:
${
f
}
"
exit
1
else
echo
Using file:
$f
echo
-e
"
${
INFO
}
Using file:
${
f
}
"
filename
=
$(
readlink
-e
"
$f
"
)
DATAVIEW+
=
"
$filename
"
acnfile
=
$(
readlink
-e
"
${
f
%.*
}
.acn"
)
if
[
-f
"
$acnfile
"
]
then
echo
Using ACN file:
$acnfile
echo
-e
"
${
INFO
}
Using ACN file:
${
acnfile
}
"
DATAVIEW+
=
"
$acnfile
"
fi
fi
...
...
@@ -32,16 +45,16 @@ if [ -z "$(echo -n $DATAVIEW)" ]
then
if
[
-f
DataView.asn
]
then
echo
'
Using file: DataView.asn'
echo
-e
'${INFO}
Using file: DataView.asn'
DATAVIEW
=
$(
readlink
-e
DataView.asn
)
else
echo
Error: no data view found
echo
'Usage: taste-update-data-view <set of ASN.1 files>'
>
&2
echo
-e
"
${
ERROR
}
No data view found"
echo
-e
"
${
INFO
}
Usage: taste-update-data-view <set of ASN.1 files>"
exit
1
fi
if
[
-f
DataView.acn
]
then
echo
'Using file: DataView.acn'
echo
-e
"
${
INFO
}
Using file: DataView.acn"
DATAVIEW+
=
"
$(
readlink
-e
DataView.acn
)
"
fi
fi
...
...
@@ -51,26 +64,28 @@ AADL=DataView.aadl
if
[
-f
__ExtraTypes.asn
]
then
echo
'Using file: __ExtraTypes.asn'
echo
-e
"
${
INFO
}
Using file: __ExtraTypes.asn"
DATAVIEW+
=
"
$(
readlink
-e
"__ExtraTypes.asn"
)
"
fi
if
[
-f
__ExtraTypes.acn
]
then
echo
'Using file: __ExtraTypes.acn'
echo
-e
"
${
INFO
}
Using file: __ExtraTypes.acn"
DATAVIEW+
=
"
$(
readlink
-e
"__ExtraTypes.acn"
)
"
fi
DATAVIEW+
=
"
$(
taste-config
--prefix
)
/share/taste-types/taste-types.asn"
asn2aadlPlus
$DATAVIEW
"
$AADL
"
-aadlv2
if
[
"
$?
"
=
"1"
]
then
echo
'ERROR: Impossible to convert the dataview from ASN.1 to AADL'
>
/dev/stderr
>
&2
echo
-e
"
${
ERROR
}
Impossible to convert the dataview from ASN.1 to AADL"
echo
-e
"
${
INFO
}
Command: asn2aadlPlus
${
DATAVIEW
}
${
AADL
}
-aadlv2"
exit
1
else
echo
All OK
echo
-e
"
${
INFO
}
All OK"
exit
0
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment