修复shell语法

This commit is contained in:
whyour 2022-10-09 13:49:19 +08:00
parent 78f643c50f
commit 6e9a4a29ef

View File

@ -170,7 +170,7 @@ run_normal() {
cd $dir_scripts
local relative_path="${file_param%/*}"
if [[ ! -z ${relative_path} ]] && [[ ${file_param} =~ "/" ]]; then
if [[ ${file_param} != /* ]] && [[ ! -z ${relative_path} ]] && [[ ${file_param} =~ "/" ]]; then
cd ${relative_path}
file_param=${file_param/$relative_path\//}
fi