shell-things/etc/apt/sources.list/install.debian

21 lines
865 B
Bash

#!/usr/bin/env bash
export RELEASE=$(lsb_release -sc)
export DOWNLOAD="https://raw.githubusercontent.com/Mikaela/shell-things/master/etc/apt/sources.list/$RELEASE"
echo "I am now changing directory to /etc/apt/."
echo ""
cd /etc/apt/
echo "I will now backup sources.list to sources.list.bak ."
echo ""
cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "I will now download the sources.list file from https://raw.githubusercontent.com/Mikaela/shell-things/master/etc/apt/sources.list/$RELEASE and save it as /etc/apt/sources.list ."
echo ""
echo "" > /etc/apt/sources.list
\wget $DOWNLOAD -O /etc/apt/sources.list
echo ""
echo "The new sources.list file should now be installed."
echo ""
echo "Finally, I will now run 'apt-get -y update' so the new sources.list is used."
echo ""
apt-get update
echo "I have now finished everything that I was supposed to do."