更新readme
This commit is contained in:
parent
551f728eb2
commit
209f3f2185
@ -54,8 +54,11 @@
|
|||||||
### 特殊文件作用
|
### 特殊文件作用
|
||||||
|
|
||||||
* **_init.sh**:目录初始化脚本,在进入目录时自动执行,用于环境依赖检查
|
* **_init.sh**:目录初始化脚本,在进入目录时自动执行,用于环境依赖检查
|
||||||
|
* **位置参数**:不接收位置参数
|
||||||
* **_menu.sh**:完全替代默认菜单,提供自定义菜单界面
|
* **_menu.sh**:完全替代默认菜单,提供自定义菜单界面
|
||||||
|
* **位置参数**:`$1` - 当前目录路径 (`local_path`)
|
||||||
* **_action.sh**:半替代菜单,接收用户选择的脚本名称和当前路径,决定如何执行
|
* **_action.sh**:半替代菜单,接收用户选择的脚本名称和当前路径,决定如何执行
|
||||||
|
* **位置参数**:`$1` - 当前目录路径 (`local_path`),`$2` - 用户选择的脚本名称 (`selected_script`)
|
||||||
|
|
||||||
### 自定义扩展方法
|
### 自定义扩展方法
|
||||||
|
|
||||||
|
3
run.sh
3
run.sh
@ -70,9 +70,6 @@ if [[ "$user_choice" =~ ^[0-9]+$ ]] && [ "$user_choice" -ge 1 ] && [ "$user_choi
|
|||||||
fi
|
fi
|
||||||
local_path=$script_path
|
local_path=$script_path
|
||||||
fi
|
fi
|
||||||
if [[ $? -eq 1 ]]; then
|
|
||||||
echo "${selected_script}可能运行失败了"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if [[ $local_path == $script_path ]]; then
|
if [[ $local_path == $script_path ]]; then
|
||||||
exit
|
exit
|
||||||
|
Loading…
Reference in New Issue
Block a user