修复安装软件错误
This commit is contained in:
parent
79b0c6c28d
commit
d1773cce27
@ -34,11 +34,10 @@ soft_dick['curl']=0
|
|||||||
soft_dick['sudo']=0
|
soft_dick['sudo']=0
|
||||||
soft_dick['ssh']=0
|
soft_dick['ssh']=0
|
||||||
soft_dick['zsh']=0
|
soft_dick['zsh']=0
|
||||||
soft_dick['Beautify-zsh']=1
|
soft_dick['zsh-beautify']=1
|
||||||
soft_dick['docker']=1
|
soft_dick['docker']=1
|
||||||
soft_dick['x-cmd']=1
|
soft_dick['x-cmd']=1
|
||||||
|
|
||||||
|
|
||||||
echo "======一键安装常用软件======"
|
echo "======一键安装常用软件======"
|
||||||
for i in "${!soft_dick[@]}" ; do
|
for i in "${!soft_dick[@]}" ; do
|
||||||
soft_number=$(( soft_number+1 ))
|
soft_number=$(( soft_number+1 ))
|
||||||
@ -53,7 +52,7 @@ if [[ -z $pick ]];then
|
|||||||
if [[ $i != 1 ]]; then
|
if [[ $i != 1 ]]; then
|
||||||
pick="$pick $i"
|
pick="$pick $i"
|
||||||
else
|
else
|
||||||
pick="$i"
|
pick="$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
elif [[ ! $pick =~ [1-"${#soft_dick[@]}"\ ] ]];then
|
elif [[ ! $pick =~ [1-"${#soft_dick[@]}"\ ] ]];then
|
||||||
@ -63,7 +62,7 @@ fi
|
|||||||
|
|
||||||
for i in $pick ; do
|
for i in $pick ; do
|
||||||
if [[ ${soft_dick[${soft_array[$i]}]} == 0 ]]; then
|
if [[ ${soft_dick[${soft_array[$i]}]} == 0 ]]; then
|
||||||
eval "$install_str $i"
|
eval "$install_str ${soft_dick{${soft_array[$i]}}}}"
|
||||||
else
|
else
|
||||||
soft_dick[${soft_array[$i]}]=2
|
soft_dick[${soft_array[$i]}]=2
|
||||||
fi
|
fi
|
||||||
@ -120,7 +119,7 @@ if [[ ${soft_dick['docker']} == 2 ]];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ${soft_dick['Beautify-zsh']} == 2 ]];then
|
if [[ ${soft_dick['zsh-beautify']} == 2 ]];then
|
||||||
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sed 's/read -r opt//g'| sed 's/exec zsh -l//g'| sh
|
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sed 's/read -r opt//g'| sed 's/exec zsh -l//g'| sh
|
||||||
while [[ ! -d "$HOME/.oh-my-zsh" ]]; do
|
while [[ ! -d "$HOME/.oh-my-zsh" ]]; do
|
||||||
sleep 3
|
sleep 3
|
||||||
|
Loading…
Reference in New Issue
Block a user