#!/bin/bash
-# update wrapper that applies changes to sudo hooks
+# upgrade instantOS to the next version
+if whoami | grep -q '^root$'
+then
+ echo "please do not run instantupdate as root"
+ exit 1
+fi
if ! checkinternet; then
echo "internet is required to upgrade instantOS"
exit 1
fi
-curl -s "https://raw.githubusercontent.com/instantOS/iso-profiles/master/pacclear.sh" | sudo bash
sudo pacman -Sy --noconfirm
instantshell
sudo pacman -Syuu --noconfirm
-instantdotfiles -f
+command -v yay && yay
+instantdotfiles
instantthemes a arc
sudo bash /usr/share/instantutils/rootinstall.sh
fi
sudo pacdiff
+
+if grep '..' /etc/pacman.d/mirrorlist | grep -v '^#' | grep -q '..'
+then
+ echo "mirrors found"
+else
+ echo "mirrors have been cleared"
+ cat /usr/share/instantdotfiles/examplemirrors | sudo tee /etc/pacman.d/mirrorlist
+fi
## installs all instantOS tools ##
#############################################
-cd
+cd || echo "ERROR: could not go to HOME"
echo "installing instantOS tools"
# laptop specific stuff
instantmouse gen
mkdir ~/instantos
+mkdir -p ~/.config/instantos
+
iconf -i userinstall 1