arch-automated-installer/scripts/system-setup/sources-setup.sh

30 lines
799 B
Bash
Raw Normal View History

2024-06-27 05:08:47 +00:00
#!/bin/bash
APT_CMD=$(which apt-get)
PACMAN_CMD=$(which pacman)
if [[ ! -z $APT_CMD ]]; then
echo "System Identified: Debian"
echo "apt-get update && apt-get -y upgrade"
while true;do
read -rp "Would you like to use Debian Unstable? (y/n): " answer
answer="${answer,,}"
if [[ "$answer" = "y" ]]; then
echo "Change apt sources"
echo "cp -v ./debian-assets/debian-sid-sources.list /etc/sources.list"
echo "apt-get update && apt-get -y dist-upgrade"
break
elif [[ "$answer" = "n" ]]; then
echo "Proceeding with Debian Stable"
break
else
echo "Invalid Input. Please enter 'y' or 'n'."
fi
done
elif [[ ! -z $PACMAN_CMD ]]; then
echo "Arch"
fi