修复安装软件错误
This commit is contained in:
parent
90885a398e
commit
839d4006aa
@ -44,9 +44,10 @@ for i in "${!soft_dick[@]}" ; do
|
|||||||
soft_array[$soft_number]=$i
|
soft_array[$soft_number]=$i
|
||||||
echo "${soft_number}.${i}"
|
echo "${soft_number}.${i}"
|
||||||
done
|
done
|
||||||
|
echo "请输入需要安装的软件序号(默认安装全部)"
|
||||||
|
read -p "用 空格 隔开:" pick
|
||||||
|
|
||||||
read -p "请输入需要安装的软件序号,用 空格 隔开:" pick
|
declare i
|
||||||
|
|
||||||
if [[ -z $pick ]];then
|
if [[ -z $pick ]];then
|
||||||
for (( i = 1; i <= ${#soft_dick[@]}; i++ )); do
|
for (( i = 1; i <= ${#soft_dick[@]}; i++ )); do
|
||||||
if [[ $i != 1 ]]; then
|
if [[ $i != 1 ]]; then
|
||||||
@ -55,7 +56,7 @@ if [[ -z $pick ]];then
|
|||||||
pick="$i"
|
pick="$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
elif [[ ! $pick =~ [1-"${#soft_dick[@]}"\ ] ]];then
|
elif [[ ! $pick =~ [1-$i\ ] ]];then
|
||||||
echo "输入错误"
|
echo "输入错误"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user