diff --git a/sh_scripts/Autosetrepo.sh b/sh_scripts/Autosetrepo.sh index f12fe48..e6a078c 100644 --- a/sh_scripts/Autosetrepo.sh +++ b/sh_scripts/Autosetrepo.sh @@ -1,5 +1,10 @@ #!/bin/bash SYSTEM=$(cat /etc/issue) +# Make sure only root can run our script +if [ "$(id -u)" != "0" ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi clear echo "################################################" echo "# #" @@ -29,48 +34,13 @@ apt-get update; case "$SYSTEM" in "Debian GNU/Linux 10 \n \l") apt install curl wget apt-transport-https dirmngr neofetch htop nload git -y - echo " - #------------------------------------------------------------------------------# - # OFFICIAL DEBIAN REPOS # - #------------------------------------------------------------------------------# - - ###### Debian Main Repos - deb http://deb.debian.org/debian/ stable main contrib non-free - deb-src http://deb.debian.org/debian/ stable main contrib non-free - - deb http://deb.debian.org/debian/ stable-updates main contrib non-free - deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free - - deb http://deb.debian.org/debian-security stable/updates main - deb-src http://deb.debian.org/debian-security stable/updates main - - deb http://ftp.debian.org/debian buster-backports main - deb-src http://ftp.debian.org/debian buster-backports main" > /etc/apt/source.list + curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/ubuntu-18.04.txt" -o /etc/apt/source.list apt update && apt upgrade -y echo "Have Fun with the Official Repos :)" ;; "Ubuntu 18.04.5 LTS \n \l") - echo " - #------------------------------------------------------------------------------# - # OFFICIAL UBUNTU REPOS # - #------------------------------------------------------------------------------# - - - ###### Ubuntu Main Repos - deb http://archive.ubuntu.com/ubuntu bionic main restricted - deb http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse - deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse - deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted - - ###### Ubuntu Update Repos - deb http://archive.ubuntu.com/ubuntu bionic universe - deb http://archive.ubuntu.com/ubuntu bionic-updates universe - deb http://archive.ubuntu.com/ubuntu bionic multiverse - deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse - deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse - deb http://security.ubuntu.com/ubuntu bionic-security main restricted - deb http://security.ubuntu.com/ubuntu bionic-security universe - deb http://security.ubuntu.com/ubuntu bionic-security multiverse" > /etc/apt/source.list + apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y + curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/debian-10.txt" -o /etc/apt/source.list apt-get update && apt-get upgrade -y echo "Have Fun with the Official Repos :)" ;; diff --git a/sh_scripts/repos/debian-10.txt b/sh_scripts/repos/debian-10.txt new file mode 100644 index 0000000..46e90dc --- /dev/null +++ b/sh_scripts/repos/debian-10.txt @@ -0,0 +1,16 @@ +#------------------------------------------------------------------------------# +# OFFICIAL DEBIAN REPOS # +#------------------------------------------------------------------------------# + +###### Debian Main Repos +deb http://deb.debian.org/debian/ stable main contrib non-free +deb-src http://deb.debian.org/debian/ stable main contrib non-free + +deb http://deb.debian.org/debian/ stable-updates main contrib non-free +deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free + +deb http://deb.debian.org/debian-security stable/updates main +deb-src http://deb.debian.org/debian-security stable/updates main + +deb http://ftp.debian.org/debian buster-backports main +deb-src http://ftp.debian.org/debian buster-backports main \ No newline at end of file