Diff of /codesys-ide/codesys [000000] .. [16685e]  Maximize  Restore

Switch to unified view

a b/codesys-ide/codesys
1
#!/bin/bash
2
3
if [ -d /usr/local/share/codesys ]; then
4
    BASEPATH=/usr/local/share/codesys
5
else    
6
    BASEPATH=$(pwd)/scripts
7
fi
8
9
# check if file exists, before we call CODESYS with it
10
if [ ! -f ${BASEPATH}/${1}.py ]; then
11
    echo "error: script '${BASEPATH}/${1}.py' not found."
12
    exit -1
13
fi
14
15
# get first CODESYS profile and start the script with it
16
profile=$(basename "$(ls -1 ~/.wine.cds/drive_c/CODESYS/CODESYS/Profiles/*.profile | head -n 1 | sed 's,.profile,,')")
17
export WINEPREFIX=~/.wine.cds
18
wine-development ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/${1}.py" --noUI 
19