From 37091efbe4ba8b6e80ff8a0f56b99dc72f60d894 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 16 Sep 2020 16:33:53 +0300 Subject: [PATCH] linux: Zano.sh improved to work from any location --- utils/Zano.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/utils/Zano.sh b/utils/Zano.sh index ac3f3d9f..d097abbc 100755 --- a/utils/Zano.sh +++ b/utils/Zano.sh @@ -1,19 +1,19 @@ -#!/bin/sh +#!/bin/bash +script_dir=$( dirname "$(readlink -f "$0")" ) -set LD_LIBRARY_PATH=${0%} -set LD_LIBRARY_PATH=$LD_LIBRARY_PATH/lib -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib -export QT_PLUGIN_PATH=$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=$script_dir/lib +export QT_PLUGIN_PATH=$script_dir/lib echo $LD_LIBRARY_PATH echo $QT_PLUGIN_PATH out_file_name=~/.local/share/applications/Zano.desktop -script_dir=$( cd $(dirname $0) ; pwd -P ) call_app() { + pushd $script_dir ./Zano + popd exit } @@ -39,7 +39,3 @@ create_desktop_icon() create_desktop_icon $out_file_name call_app - - - -