This commit is contained in:
Thomas Forgione 2019-04-18 09:53:22 +02:00
parent ed22dde744
commit c417983266
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 6 additions and 4 deletions

View File

@ -144,7 +144,7 @@ configure_zsh() {
if [ $sudo_available -eq 0 ]; then if [ $sudo_available -eq 0 ]; then
# Sudo is available, run chsh # Sudo is available, run chsh
yes_no_ask "do you want to change your shell ? (you'll need root) ?" yes_no_ask "do you want to change your shell ?"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
info "changing your shell" info "changing your shell"
sudo chsh $user -s /bin/zsh sudo chsh $user -s /bin/zsh
@ -167,11 +167,13 @@ configure_zsh() {
main() { main() {
echo_green "=== WELCOME TO TFORGIONE'S CONFIG INSTALLER ===" 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 ?"
sudo_available=$?
configure_zsh configure_zsh
} }
sudo -n -l true 2>&1
sudo_available=$?
main < /dev/tty main < /dev/tty