diff --git a/fresh.sh b/fresh.sh index b8946e4..70901a3 100755 --- a/fresh.sh +++ b/fresh.sh @@ -31,7 +31,16 @@ startup_msg() { echo "Script started - Platform is: $curr_platform\n\n" >> $logfile } +wait_for_network() { + dialog --infobox "Waiting for internet connection...\n\nDumdidum dum dumdiii dum" 0 0 + dhcpcd >> $logfile + while [ ! $OK = 0 ]; do + ping -c 1 -q "one.one.one.one" >> $logfile && OK=$? + done +} + init() { + wait_for_network pacman -S --noconfirm --needed dialog git make || { echo "Run as root user"; exit; } refresh_keyring }