added check_prerequisites
This commit is contained in:
parent
5b3b3eaf89
commit
351a23ce0d
@ -155,6 +155,27 @@ function suse_install_codecs(){
|
|||||||
sudo "$HOME/bin/install_codecs"
|
sudo "$HOME/bin/install_codecs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_prerequisites(){
|
||||||
|
local answer
|
||||||
|
if !type git > /dev/null 2>&1;then
|
||||||
|
printf "git is not installed, do your want to install it [y/N]?"
|
||||||
|
read -r -n 1 -s answer;
|
||||||
|
printf "\n"
|
||||||
|
if [[ $answer == [yY] ]];then
|
||||||
|
sudo zypper install --non-interactive git
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if type !salt-call > /dev/null 2>&1;then
|
||||||
|
printf "salt-minion is not installed, do your want to install it [y/N]?"
|
||||||
|
read -r -n 1 -s answer;
|
||||||
|
printf "\n"
|
||||||
|
if [[ $answer == [yY] ]];then
|
||||||
|
sudo zypper install --non-interactive salt-minion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#initialize all options
|
#initialize all options
|
||||||
ALL=true
|
ALL=true
|
||||||
CODECS=false
|
CODECS=false
|
||||||
@ -211,6 +232,8 @@ while :; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
check_prerequisites
|
||||||
|
|
||||||
[[ $ALL == true ]] || [[ $DOTFILES == true ]] && setup_dotfiles
|
[[ $ALL == true ]] || [[ $DOTFILES == true ]] && setup_dotfiles
|
||||||
[[ $ALL == true ]] || [[ $SALT == true ]] && do_salt_call
|
[[ $ALL == true ]] || [[ $SALT == true ]] && do_salt_call
|
||||||
[[ $ALL == true ]] || [[ $FIREFOX == true ]] && firefox_config
|
[[ $ALL == true ]] || [[ $FIREFOX == true ]] && firefox_config
|
||||||
|
Loading…
Reference in New Issue
Block a user