From ed1293c98878920d1b9f359b1f608177ad052673 Mon Sep 17 00:00:00 2001 From: "pavel.muhortov" Date: Sat, 7 Jan 2023 09:03:18 +0300 Subject: [PATCH] working directory defined --- script.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 855b9c4..4d658f8 100644 --- a/script.sh +++ b/script.sh @@ -47,7 +47,7 @@ checkroot() { show=${1} conf=${2} if [ -z "${conf}" ] || [ "${conf}" == "-" ];then - conf=$(dirname $(realpath $0))/$(basename -s .sh $0).conf + conf="$(dirname $(realpath "$0"))/$(basename -s .sh $0).conf" fi # @@ -55,6 +55,7 @@ fi # time=$(date +%s) +cd "$(dirname "$(realpath "$0")")" if [ ! -e ${conf} ];then : else