revert "remove useless readlink"

This commit is contained in:
illiliti 2020-02-16 02:53:33 +03:00
parent 423297501b
commit 0caaddbe64

View File

@ -42,7 +42,7 @@ remove_wrkdir() {
# change current directory to script directory if user haven't do it # change current directory to script directory if user haven't do it
check_currentdir() { check_currentdir() {
scriptdir=$(dirname "$0") scriptdir=$(readlink -f $(dirname "$0"))
[ "$PWD" = "$scriptdir" ] || { [ "$PWD" = "$scriptdir" ] || {
msg info "changing current directory to script directory" msg info "changing current directory to script directory"
cd "$scriptdir" || msg panic "failed to change directory" cd "$scriptdir" || msg panic "failed to change directory"