Diff of /codesys-ide/codesyscontrol [000000] .. [3a34bb]  Maximize  Restore

Switch to unified view

a b/codesys-ide/codesyscontrol
1
#!/bin/bash
2
3
if [ -z $1 ]; then
4
    echo "usage: $0 <filename of offline bootproject (*.app)> [<artifact 1> <artifact 2>]"
5
    exit -1
6
fi
7
8
# create temporary working directory
9
tmpdir=$(mktemp -d)
10
11
# create config file
12
appname=$(basename ${1} .app)
13
cp ${appname}.app ${tmpdir}/Application.app
14
cp ${appname}.crc ${tmpdir}/Application.crc
15
16
cat > ${tmpdir}/CODESYSControl.cfg <<EOF
17
[CmpApp]
18
Application.1=Application
19
20
[SysFile]
21
FilePath.1=/etc/, 3S.dat
22
EOF
23
24
# run codesys control
25
(
26
    cd ${tmpdir};
27
    /opt/codesys/bin/codesyscontrol.bin -d CODESYSControl.cfg;
28
)
29
30
# remove temporary working directory
31
[ -d ${tmpdir} ] && rm -rf ${tmpdir}