修复脚本路径问题
This commit is contained in:
parent
1774606938
commit
a337436c3a
8
run.sh
8
run.sh
@ -7,13 +7,12 @@ fi
|
||||
|
||||
declare -a function_array
|
||||
declare selected_function
|
||||
declare script_path=$(dirname $0)
|
||||
declare script_path=$(dirname $(readlink -f $0))
|
||||
script_path="${script_path}/Config"
|
||||
declare local_path=$script_path
|
||||
declare script_name
|
||||
|
||||
while true
|
||||
do
|
||||
while true; do
|
||||
# 1. 目录初始化脚本 _init.sh
|
||||
if [[ -e "${local_path}/_init.sh" ]]; then
|
||||
bash "${local_path}/_init.sh"
|
||||
@ -35,8 +34,7 @@ fi
|
||||
selected_function=0
|
||||
function_array=()
|
||||
echo "======$(basename $local_path .sh)======"
|
||||
for i in "${local_path}"/*
|
||||
do
|
||||
for i in "${local_path}"/*; do
|
||||
script_name=$(awk -F '.' '{print $1}' <<<"$(basename $i)")
|
||||
# 忽略特殊文件
|
||||
if [[ $script_name =~ ^_ ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user