diff --git a/sh_scripts/official_repo.sh b/sh_scripts/official_repo.sh index e2afb4e..3eb7328 100644 --- a/sh_scripts/official_repo.sh +++ b/sh_scripts/official_repo.sh @@ -1,5 +1,5 @@ #!/bin/bash -SYSTEM=$(cat /etc/issue) +SYSTEM=$(cat /etc/*-release | grep "VERSION_ID=") # Make sure only root can run our script if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 @@ -30,61 +30,45 @@ echo "" echo "" echo "LETS GO!" -case "$SYSTEM" in - "Debian GNU/Linux 11 \n \l") - apt-get update - 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-11.txt" -o /etc/apt/source.list - apt-get update && apt-get upgrade -y - echo "Have Fun with the Official Repos :)" - ;; - "Debian GNU/Linux 10 \n \l") - apt-get update - 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 :)" - ;; - "Debian GNU/Linux 9 \n \l") - apt-get update - 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-9.txt" -o /etc/apt/source.list - apt-get update && apt-get upgrade -y - echo "Have Fun with the Official Repos :)" - ;; - "Ubuntu 18.04.5 LTS \n \l") - apt-get update - 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/ubuntu-18.04.txt" -o /etc/apt/source.list - apt-get update && apt-get upgrade -y - echo "Have Fun with the Official Repos :)" - ;; - "Ubuntu 16.04.7 LTS \n \l") - apt-get update - 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/ubuntu-16.04.txt" -o /etc/apt/source.list - apt-get update && apt-get upgrade -y - echo "Have Fun with the Official Repos :)" - ;; - "Ubuntu 20.04.2 LTS \n \l") - apt-get update - 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/ubuntu-20.04.txt" -o /etc/apt/source.list - apt-get update && apt-get upgrade -y - echo "Have Fun with the Official Repos :)" - ;; - *) - clear - echo "DE >" - echo "Dein System wird zurzeit nicht unterstützt!" - echo "" - echo "Schreibe doch dazu ein Issue auf Github" - echo "> https://github.com/MrUnknownDE/linux-script/issues/new" - echo "" - echo "" - echo "EN >" - echo "Your system is currently not supported!" - echo "" - echo "Please write an issue on Github" - echo "> https://github.com/MrUnknownDE/linux-script/issues/new" -esac \ No newline at end of file +if [ $SYSTEM = 11 ]; then + apt-get update + 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-11.txt" -o /etc/apt/sources.list + apt-get update && apt-get upgrade -y + echo "Have Fun with the Official Repos :)" +fi +if [ $SYSTEM = 10 ]; then + apt-get update + 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/sources.list + apt-get update && apt-get upgrade -y + echo "Have Fun with the Official Repos :)" +fi +if [ $SYSTEM = 9 ]; then + apt-get update + 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-9.txt" -o /etc/apt/sources.list + apt-get update && apt-get upgrade -y + echo "Have Fun with the Official Repos :)" +fi +if [ $SYSTEM = Ubuntu 18.04 ]; then + apt-get update + 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/ubuntu-18.04.txt" -o /etc/apt/sources.list + apt-get update && apt-get upgrade -y + echo "Have Fun with the Official Repos :)" +fi +if [ $SYSTEM = Ubuntu 16.04 ]; then + apt-get update + 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/ubuntu-16.04.txt" -o /etc/apt/sources.list + apt-get update && apt-get upgrade -y + echo "Have Fun with the Official Repos :)" +fi +if [ $SYSTEM = Ubuntu 20.04 ]; then + apt-get update + 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/ubuntu-20.04.txt" -o /etc/apt/sources.list + apt-get update && apt-get upgrade -y + echo "Have Fun with the Official Repos :)" +fi \ No newline at end of file diff --git a/sh_scripts/repos/debian-11.txt b/sh_scripts/repos/debian-11.txt index 7b14ff7..9e1b858 100644 --- a/sh_scripts/repos/debian-11.txt +++ b/sh_scripts/repos/debian-11.txt @@ -3,11 +3,14 @@ #------------------------------------------------------------------------------# ###### Debian Main Repos -deb http://deb.debian.org/debian/ testing main contrib non-free -deb-src http://deb.debian.org/debian/ testing main contrib non-free +deb http://deb.debian.org/debian bullseye main contrib non-free +deb-src http://deb.debian.org/debian bullseye main contrib non-free -deb http://deb.debian.org/debian/ testing-updates main contrib non-free -deb-src http://deb.debian.org/debian/ testing-updates main contrib non-free +deb http://deb.debian.org/debian bullseye-updates main contrib non-free +deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free -deb http://deb.debian.org/debian-security testing-security main -deb-src http://deb.debian.org/debian-security testing-security main \ No newline at end of file +deb http://deb.debian.org/debian bullseye-backports main contrib non-free +deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free + +deb http://security.debian.org/debian-security bullseye-security main contrib non-free +deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free \ No newline at end of file