a/codesys-ide/codesys | b/codesys-ide/codesys | ||
---|---|---|---|
... |
... |
||
22 | echo "error: script '${BASEPATH}/${1}.py' not found." |
22 | echo "error: script '${BASEPATH}/${1}.py' not found." |
23 | exit -1 |
23 | exit -1 |
24 | fi |
24 | fi |
25 | 25 | ||
26 | export DISPLAY=:91 |
26 | export DISPLAY=:91 |
27 | Xvfb :91 & |
27 | Xvfb :91 &> /dev/zero & |
28 | sleep 10 |
28 | sleep 1 |
29 | export WINEPREFIX=~/.wine.cds |
29 | export WINEPREFIX=~/.wine.cds |
30 | wine-development ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/test.py" --noUI |
30 | wine-development ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/test.py" --noUI |
31 | wine-development ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/${1}.py" --noUI |
31 | wine-development ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/${1}.py" --noUI |
32 | result=$? |
32 | result=$? |
33 | 33 | sleep 1 |
|
34 | killall Xvfb |
34 | killall Xvfb |
35 | rm /tmp/.X* |
35 | rm -rf /tmp/.X* |
36 | 36 | ||
37 | if [ "${result}" == "0" ]; then |
37 | if [ "${result}" == "0" ]; then |
38 | true |
38 | true |
39 | else |
39 | else |
40 | false |
40 | false |