diff --git a/shell/bootstrap-void.sh b/shell/bootstrap-void.sh index 0b39075..f794f0f 100755 --- a/shell/bootstrap-void.sh +++ b/shell/bootstrap-void.sh @@ -7,12 +7,25 @@ normal="$(tput sgr0)\n" cd $HOME +# Exit if the entire script is running as root +SCRIPTUID=$(id -u) +if [[ $SCRIPTUID == 0 ]]; then + echo "This script is not designed to be run as root. Please log with your regular user and run the script without sudo" + exit 1 +fi + printf "${green}\n\n" printf " This script will bootstrap a Void Linux\n" -printf " install with packages and the Arc themes.\n" +printf " install with packages and the GTK/Icon themes.\n" printf " You will be asked for your sudo password.\n\n${normal}" -sleep 5 +printf "${green}Script will proceed in:\n" +for sec in {10..0}; do + sleep 1 + printf "\33[2K\r" + printf "$sec... (Ctrl+C to cancel)" +done +printf "${normal}\n" printf "${green}Please input your sudo password.${normal}" sudo printf "${green}Thank you!${normal}"