made changes so that start-gui.sh script can be called from anywhere and also from or with symbolic links

This commit is contained in:
8go 2017-05-10 08:29:14 +02:00
parent 009362451d
commit a046163477

View file

@ -46,7 +46,9 @@ cat > $TARGET/start-gui.sh <<EOL
export LD_LIBRARY_PATH=\`pwd\`/libs export LD_LIBRARY_PATH=\`pwd\`/libs
export QT_PLUGIN_PATH=\`pwd\`/plugins export QT_PLUGIN_PATH=\`pwd\`/plugins
export QML2_IMPORT_PATH=\`pwd\`/qml export QML2_IMPORT_PATH=\`pwd\`/qml
./$GUI_EXEC # make it so that it can be called from anywhere and also through soft links
SCRIPT_DIR="\$(dirname "\$(test -L "\${BASH_SOURCE[0]}" && readlink "\${BASH_SOURCE[0]}" || echo "\${BASH_SOURCE[0]}")")"
"\$SCRIPT_DIR"/$GUI_EXEC
EOL EOL
chmod +x $TARGET/start-gui.sh chmod +x $TARGET/start-gui.sh