diff --git a/script/dot.sh b/script/dot.sh index 72eb0b7..eeff80d 100755 --- a/script/dot.sh +++ b/script/dot.sh @@ -290,7 +290,6 @@ restart_os() printf "\n" if answer_is_yes; then - ask_for_sudo sudo shutdown -r now &> /dev/null fi } @@ -321,6 +320,10 @@ main() # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ask_for_sudo + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Check if this script was run directly, and if not, dotfiles will need to be # downloaded. diff --git a/script/utils.sh b/script/utils.sh index 4d3ec53..62319e7 100755 --- a/script/utils.sh +++ b/script/utils.sh @@ -164,7 +164,7 @@ show_spinner() tput sc while kill -0 "$PID" &> /dev/null; do - frame_text=" [${FRAMES:i++%NUMBER_OF_FRAMES:1}] $MSG" + frame_text=" [${FRAMES:i++%NUMBER_OF_FRAMES:1}] $MSG" # Print frame text. printf "%s" "$frame_text" @@ -237,7 +237,7 @@ execute() # Print output based on what happened. print_result $exit_code "$MSG" - if [[ $exit -ne 0 ]]; then + if [[ $exit_code -ne 0 ]]; then print_error_stream < "$TMP_FILE" fi