diff --git a/etc/apt/sources.list/README.md b/etc/apt/sources.list/README.md index bcb3dd4d..7eb067a5 100644 --- a/etc/apt/sources.list/README.md +++ b/etc/apt/sources.list/README.md @@ -10,9 +10,21 @@ the files work everywhere and the nearest mirrors are always used no matter where you are. Which script to use? +-------------------- * `install` for Ubuntu and Debian testing/unstable. * If you run `ìnstall` on Debian Stable, sources.list will say `stable` and when new Debian becomes stable apt wants to upgrade to it directly and that can be dangerous. * `install.debian` for not-rolling Debian. + +Usage +----- + +1. Become root with `sudo su -` +2. Download the script either with either of the following): + 1. `curl -LO https://github.com/Mikaela/shell-things/raw/master/etc/apt/sources.list/install` + 2. `https://github.com/Mikaela/shell-things/raw/master/etc/apt/sources.list/install.debian` +3. `chmod +x install*` +4. `./install` or `./install.debian` +5. *optionally* `rm install` or `rm install.debian` diff --git a/etc/apt/sources.list/install b/etc/apt/sources.list/install index e69de29b..420374f3 100644 --- a/etc/apt/sources.list/install +++ b/etc/apt/sources.list/install @@ -0,0 +1,19 @@ +export RELEASE=$(lsb_release -sr) +a[1]="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 ${a[1]} -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." diff --git a/etc/apt/sources.list/install.debian b/etc/apt/sources.list/install.debian index e69de29b..ddb36f31 100644 --- a/etc/apt/sources.list/install.debian +++ b/etc/apt/sources.list/install.debian @@ -0,0 +1,19 @@ +export RELEASE=$(lsb_release -sc) +a[1]="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 ${a[1]} -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."