_? -> ?
This commit is contained in:
parent
ede0164958
commit
de7b19e9b9
20
tforgione.sh
20
tforgione.sh
|
@ -146,7 +146,7 @@ clone_dotfiles() {
|
|||
error "git is needed, but you don't have git or sudo"
|
||||
return 1
|
||||
else
|
||||
yes_no_ask_required "you'll need git for this, do you wish to install git ?"
|
||||
yes_no_ask_required "you'll need git for this, do you wish to install git?"
|
||||
install git
|
||||
fi
|
||||
fi
|
||||
|
@ -167,7 +167,7 @@ clone_dotfiles() {
|
|||
|
||||
configure_dotfiles() {
|
||||
if [ ! -d $HOME/.config/dotfiles ]; then
|
||||
yes_no_ask "do you wish to configure the dotfiles ?"
|
||||
yes_no_ask "do you wish to configure the dotfiles?"
|
||||
if [ $? -ne 0 ]; then
|
||||
return
|
||||
fi
|
||||
|
@ -178,9 +178,9 @@ configure_dotfiles() {
|
|||
|
||||
configure_shell() {
|
||||
|
||||
yes_no_ask "do you wish to install and configure zsh ?"
|
||||
yes_no_ask "do you wish to install and configure zsh?"
|
||||
if [ $? -ne 0 ]; then
|
||||
yes_no_ask "you don't want zsh ? Ok... but can I at least give you a nice bashrc ?"
|
||||
yes_no_ask "you don't want zsh? Ok... but can I at least give you a nice bashrc?"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
info "ok :'( I guess I'm not doing anything then"
|
||||
|
@ -208,7 +208,7 @@ configure_shell() {
|
|||
error "zsh is needed, but you don't have zsh or sudo"
|
||||
return 1
|
||||
else
|
||||
yes_no_ask_required "this magnificent prompt is based on zsh, do you wish to install zsh ?"
|
||||
yes_no_ask_required "this magnificent prompt is based on zsh, do you wish to install zsh?"
|
||||
install zsh
|
||||
fi
|
||||
fi
|
||||
|
@ -243,7 +243,7 @@ configure_shell() {
|
|||
|
||||
if [ $sudo_available -eq 0 ]; then
|
||||
# Sudo is available, run chsh
|
||||
yes_no_ask "do you want to change your shell ?"
|
||||
yes_no_ask "do you want to change your shell?"
|
||||
if [ $? -eq 0 ]; then
|
||||
info "changing your shell"
|
||||
sudo chsh $user -s /bin/zsh
|
||||
|
@ -252,7 +252,7 @@ configure_shell() {
|
|||
fi
|
||||
else
|
||||
info "you don't have root, but you can run 'exec zsh' at the end of your bashrc"
|
||||
yes_no_ask "do you wish to do that ?"
|
||||
yes_no_ask "do you wish to do that?"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo >> $HOME/.bashrc
|
||||
echo "exec zsh" >> $HOME/.bashrc
|
||||
|
@ -271,7 +271,7 @@ configure_neovim() {
|
|||
return
|
||||
fi
|
||||
|
||||
yes_no_ask "do you wish to install and configure neovim ?"
|
||||
yes_no_ask "do you wish to install and configure neovim?"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
info "not installing neovim"
|
||||
|
@ -308,7 +308,7 @@ configure_neovim() {
|
|||
}
|
||||
|
||||
configure_rust() {
|
||||
yes_no_ask "do you wish to install and configure rust ?"
|
||||
yes_no_ask "do you wish to install and configure rust?"
|
||||
if [ $? -ne 0 ]; then
|
||||
return
|
||||
fi
|
||||
|
@ -320,7 +320,7 @@ main() {
|
|||
echo_green "=== WELCOME TO TFORGIONE'S CONFIG INSTALLER ==="
|
||||
|
||||
info "before anything, i need to know if your user can use sudo"
|
||||
yes_no_ask "can your user use sudo ?"
|
||||
yes_no_ask "can your user use sudo?"
|
||||
sudo_available=$?
|
||||
|
||||
configure_dotfiles
|
||||
|
|
Loading…
Reference in New Issue