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