aboutsummaryrefslogtreecommitdiff
path: root/linuxdeploy_helper.sh
diff options
context:
space:
mode:
author8go <8go@localhost.localdomain>2017-05-10 08:29:14 +0200
committer8go <8go@localhost.localdomain>2017-05-10 08:29:14 +0200
commita0461634770a29dbf9e05074e4423dd408abfd8f (patch)
tree4fa3453c6315648cfed92b89cc3b8565012b3321 /linuxdeploy_helper.sh
parent009362451d5f44843a2df9c73fff87d4e2a3ca33 (diff)
downloadmonzero-gui-a0461634770a29dbf9e05074e4423dd408abfd8f.tar.gz
monzero-gui-a0461634770a29dbf9e05074e4423dd408abfd8f.tar.xz
monzero-gui-a0461634770a29dbf9e05074e4423dd408abfd8f.zip
made changes so that start-gui.sh script can be called from anywhere and also from or with symbolic links
Diffstat (limited to 'linuxdeploy_helper.sh')
-rwxr-xr-xlinuxdeploy_helper.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/linuxdeploy_helper.sh b/linuxdeploy_helper.sh
index d65676ce..cf9a6417 100755
--- a/linuxdeploy_helper.sh
+++ b/linuxdeploy_helper.sh
@@ -46,7 +46,9 @@ cat > $TARGET/start-gui.sh <<EOL
export LD_LIBRARY_PATH=\`pwd\`/libs
export QT_PLUGIN_PATH=\`pwd\`/plugins
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
-chmod +x $TARGET/start-gui.sh \ No newline at end of file
+chmod +x $TARGET/start-gui.sh