Files
project_scripts/btl_ctl.sh

41 lines
884 B
Bash
Raw Normal View History

#!/bin/bash
start() {
cd ~/Workplace/scripts
python start.py
}
run() {
cd ~/Workplace/project_main/
python main.py
}
2024-07-04 17:51:37 +08:00
axis() {
cd ~/Workplace/toolkits
./axis_assist
}
command_array=("start" "run")
if [ $# -lt 1 ]; then
echo "请明确指令:"
for cmd in "${command_array[@]}"; do
echo "$cmd"
done
exit
else
if [[ $1 == "start" || $1 == "-start" || $1 == "START" ]]; then
start # 这里添加了调用start函数的代码
elif [[ $1 == "run" || $1 == "-run" || $1 == "RUN" ]]; then
run # 假设你希望在这里调用run函数
2024-07-04 17:51:37 +08:00
elif [[ $1 == "axis" || $1 == "-axis" || $1 == "AXIS" ]]; then
axis #
elif [[ $1 == "help" || $1 == "-help" || $1 == "HELP" ]]; then
echo "start: 启动服务端脚本"
echo "run: 启动任务主程序脚本"
2024-07-04 17:51:37 +08:00
echo "axis: 執行機構調試腳本"
else
echo "无效的指令:$1"
fi
fi