File tree Expand file tree Collapse file tree 2 files changed +29
-33
lines changed
bin/envisage/main_generator
config/envisage/smart_deployer Expand file tree Collapse file tree 2 files changed +29
-33
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
. envisage/envisage_settings.sh
4
- . default /parse_params.sh
4
+ . misc /parse_params.sh
5
5
6
- # use minizinc 1.6 that is assumed to be stored in $MAINGENHOME/minizinc-1.6/bin
7
- PATH=$MAINGENHOME /minizinc-1.6/bin:$PATH
6
+ execroot=$( getparam " execroot" )
7
+ files=$( getparam " files" )
8
+ outdir=$execroot /_ei_tmp
8
9
9
- abs=" "
10
- spec=" "
11
- json=" "
10
+ file=" "
11
+ orderedfiles=" "
12
12
13
- for f in $files
13
+ for f in $files
14
14
do
15
- ext=${f##* .}
16
- if [ $ext = " abs" ]; then
17
- abs=$f
18
- elif [ $ext = " spec" ]; then
19
- spec=$f
20
- elif [ $ext = " json" ]; then
21
- json=$f
22
- fi ;
15
+ grep " \[[\ ]*SmartDeploy[\ ]*:" $f > /dev/null
16
+ if [ $? == 0 ]; then
17
+ file=$f
18
+ orderedfiles=" $f $orderedfiles "
19
+ else
20
+ orderedfiles=" $orderedfiles $f "
21
+ fi
23
22
done
24
23
24
+ echo " <eiout>"
25
+ echo " <eicommands>"
26
+ echo " <printonconsole>"
27
+ echo " <content format='text'><![CDATA["
25
28
26
- if [ ! -z $abs ] && [ ! -z $spec ] && [ ! -z $json ]; then
27
- python $MAINGENHOME /abs_deployer/abs_deployer.py $abs $spec $json
28
-
29
+ if [ $file == " " ]; then
30
+ echo " Not found"
29
31
else
30
- echo " <eiout>"
31
- echo " <eicommands>"
32
- echo " <dialogbox outclass='error' boxtitle='Error!'>"
33
- echo " <content format='html'>"
34
- echo
35
- echo " <ul>"
36
- echo " <li><span style='color: red'>Three input files (.abs, .spec, and .json) are required.</span></li>"
37
- echo " </ul>"
38
- echo " </content>"
39
- echo " </dialogbox>"
40
- echo " </eicommands>"
41
- echo " </eiout>"
32
+ python $SMARTDEPLOYERHOME /abs_deployer/abs_deployer.py $orderedfiles 2> $outdir /smartdeployer.stderr
33
+ if [ ! $? == 0 ]; then
34
+ cat $outdir /smartdeployer.stderr
35
+ fi
42
36
fi
43
37
44
-
45
-
38
+ echo " ]]></content>"
39
+ echo " </printonconsole>"
40
+ echo " </eicommands>"
41
+ echo " </eiout>"
46
42
Original file line number Diff line number Diff line change 8
8
</desc>
9
9
</appinfo>
10
10
<execinfo method =" cmdline" >
11
- <cmdlineapp>./envisage/smart_deployer/run.sh -f _ei_files</cmdlineapp>
11
+ <cmdlineapp>./envisage/smart_deployer/run.sh -execroot _ei_root -files _ei_files</cmdlineapp>
12
12
</execinfo>
13
13
</app>
You can’t perform that action at this time.
0 commit comments