Index: run.sh =================================================================== diff -u -rd711fdaf5fdcd83ec84ec7a05965768429483c29 -r8e2c4c3c8d6653d7d8107731eba6f0ca77091301 --- run.sh (.../run.sh) (revision d711fdaf5fdcd83ec84ec7a05965768429483c29) +++ run.sh (.../run.sh) (revision 8e2c4c3c8d6653d7d8107731eba6f0ca77091301) @@ -1,7 +1,12 @@ #!/bin/sh -location() { - if [ -L "$0" ]; then - local filename="$0" + +### Varialbes + +### Functions + +realPath() { + local filename="$1" + if [ -L "$filename" ]; then local linkinfo=$(readlink $filename) local filepath=$(dirname $linkinfo) echo $filepath @@ -10,8 +15,10 @@ fi } -cd $(location) +### Main +cd $(realPath "$0") + export QT_QPA_PLATFORM=xcb export XDG_SESSION_TYPE=xcb python3 ./simulator.py $1 $2 $3 $4 $5 $6 &