2024-06-24 16:55:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
APT_CMD=$(which apt-get)
|
|
|
|
PACMAN_CMD=$(which pacman)
|
|
|
|
|
|
|
|
if [[ ! -z $APT_CMD ]]; then
|
2024-06-24 18:09:35 +00:00
|
|
|
|
2024-06-24 17:22:18 +00:00
|
|
|
echo "System Identified: Debian"
|
2024-06-24 18:09:35 +00:00
|
|
|
# Make sure System is Updated
|
|
|
|
echo "apt-get update && apt-get upgrade -Y"
|
|
|
|
#apt update && apt upgrade -Y
|
2024-06-24 16:55:52 +00:00
|
|
|
|
2024-06-24 17:22:18 +00:00
|
|
|
# Setup apt sources
|
|
|
|
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"
|
2024-06-24 18:09:35 +00:00
|
|
|
echo "cp -v ./debian-assets/debian-sid-sources.list /etc/sources.list"
|
|
|
|
echo "apt-get update && apt-get upgrade -Y"
|
2024-06-24 17:22:18 +00:00
|
|
|
break
|
|
|
|
elif [[ "$answer" = "n" ]]; then
|
|
|
|
echo "Proceeding with Debian Stable"
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid Input. Please enter 'y' or 'n'."
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Start System Setup
|
2024-06-24 18:09:35 +00:00
|
|
|
|
2024-06-24 16:55:52 +00:00
|
|
|
elif [[ ! -z $PACMAN_CMD ]]; then
|
|
|
|
echo "Arch"
|
|
|
|
fi
|