taste-edit-project 1.35 KB
Newer Older
Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
if [ -f InterfaceView.aadl ]
then
    echo 'Opening TASTE project'
    INTERFACEVIEW=InterfaceView.aadl
else
    echo Error: missing InterfaceView.aadl
    echo First use taste-create-project to start a new project
    exit 1
fi

grep -i taste-directives.aadl "$INTERFACEVIEW" >/dev/null && {
    echo Your interface view needs to be upgraded\!
    echo Please upgrade it with:
    echo
    echo "  taste-upgrade-IF-view oldIFview newIFview"
    echo
    echo ...and use the newIFview instead.
    exit 1
}

echo TASTE Project Editor - Use only the SAVE button - not \"Save as..\" !

# If there is no deployment view, only load interface view
EXTRA_CMD=
if [ ! -f DeploymentView.aadl ]
then
    EXTRA_CMD+=--load-interface-view
    EXTRA_CMD+=' InterfaceView.aadl' 
30
    EXTRA_CMD+=' --aadl-library $(taste-config --prefix)/share/ocarina/AADLv2/ocarina_components.aadl '
Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
31
32
33
else
    EXTRA_CMD=
fi
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

# Add the components from the components library
FIRST=1
LIBDIR=$(taste-config --prefix)/share/components_library
for each in $LIBDIR/*
do
    if [ $FIRST -eq 1 ]
    then
        EXTRA_CMD+='--edit-aadl '
    else
        EXTRA_CMD+=,
    fi
    EXTRA_CMD+=$each/interfaceview.aadl
    FIRST=0
done

Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
50
51
echo TASTE $EXTRA_CMD --data-view DataView.aadl --load-deployment-view DeploymentView.aadl
TASTE $EXTRA_CMD --data-view DataView.aadl --load-deployment-view DeploymentView.aadl