修复软件安装正则问题

This commit is contained in:
lsy 2024-09-23 19:15:46 +08:00
parent d73a9e969b
commit ac526c51b9

View File

@ -55,7 +55,7 @@ if [[ -z $pick ]];then
pick="$i"
fi
done
elif [[ ! $pick =~ [1-${#soft_dick[@]}[:space:]]+ ]];then
elif [[ ! $pick =~ ^[[:space:]]*([1-${#soft_dick[@]}]+([[:space:]]+[1-${#soft_dick[@]}]+)*)?[[:space:]]*$ ]];then
echo "输入错误"
exit
fi