fix working dir location

This commit is contained in:
Casper Chang
2021-01-04 16:38:27 +08:00
parent d7d973c280
commit 1f169db2e4
6 changed files with 46 additions and 9 deletions

View File

@@ -2,9 +2,12 @@
#
# Create working directory
# somehow there's a space char when expect argument
_working_dir_name=$1
_working_dir_name=${_working_dir_name::-1}
if [ ${_working_dir_name: -1} = " " ]; then
#somehow there's a space char when expect argument
_working_dir_name=${_working_dir_name::-1}
fi
_mydir="$(pwd)"
_parentdir="$(dirname "$_mydir")"