echo "1) Last ned og installer packet tracer"
echo "2) Last ned og installer steam"
echo "3) Last ned, installer or konfigurer doas"
echo "4) Oppdater dette programmet" 

read valg
if [ "$valg" = "1" ]
then
	echo "Trykk enter naar du blir spurt om det, eller skriv inn passordet ditt"
	echo "Laster ned packet tracer..."
	echo ""
	echo ""
	echo ""
	sleep 5
	wget http://direct.lysakermoen.com/Software/Linux/Scripts/CustomScripts/packettracer.sh
	chmod +x packettracer.sh
	bash packettracer.sh
	rm packettracer.sh
	echo "Ferdig!"
else
	if [ "$valg" = "2" ]
	then
		sudo bash -c "echo '# Disse er laget av installasjonsprogrammet til Sander' >> /etc/pacman.conf"
		sudo bash -c "echo '[multilib]' >> /etc/pacman.conf"
		sudo bash -c "echo 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf"
		sudo pacman -Syyu steam
	fi
	if [ "$valg" = "3" ]
	then
		sudo pacman -S doas
		sudo touch /etc/doas.conf
		sudo touch ~/.bashrc
		sudo touch ~/.zshrc
		sudo chown -c root:root /etc/doas.conf
		sudo chmod 0400 /etc/doas.conf
		sudo echo "alias sudo=doas" >> ~/.bashrc
		sudo echo "alias sudo=doas" >> ~/.zshrc
		sudo echo "Ferdig! Lukk terminalvinduet for aa ferdiggjore"
	fi
	if [ "$valg" = "4" ]
	then
		echo "Oppdaterer..."
		mv installer.sh old.sh
		wget http://direct.lysakermoen.com/Software/Linux/Scripts/CustomScripts/installer.sh
		chmod +x installer.sh
		rm old.sh
	fi
fi