forked from robertobucher/pysimCoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpysim-run.sh
executable file
·33 lines (27 loc) · 934 Bytes
/
pysim-run.sh
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
30
31
32
33
#!/bin/sh
export PYSUPSICTRL="$( cd "$(dirname "$0")" ; pwd )"
if [ $# -eq 0 ]; then
appname="pysimCoder"
else
case "$1" in
-* ) appname="pysimCoder" ;;
*.dgm ) appname="pysimCoder" ;;
* ) appname="$(basename $1)" ; shift
esac
fi
if [ ! -e "$PYSUPSICTRL/BlockEditor/$appname.py" ] ; then
# find all .py applications
applications=$(find "$PYSUPSICTRL/BlockEditor" -name "*.py" -execdir basename {} \; | sed s/.py//)
scriptname="$(basename $0)"
echo "Usage: $scriptname APP APPARGS"
echo "APP is one of the following:"
echo "$applications"
exit 1
fi
if [ -n "$PYTHONPATH" ] ; then
PYTHONPATH=":$PYTHONPATH"
fi
export PYTHONPATH=":$PYSUPSICTRL/resources/blocks/rcpBlk$PYTHONPATH"
export PYTHONPATH=":$PYSUPSICTRL/toolbox/supsictrl$PYTHONPATH"
export PYTHONPATH="$PYSUPSICTRL/toolbox/supsisim$PYTHONPATH"
/usr/bin/python3 "$PYSUPSICTRL/BlockEditor/$appname.py" "$@"