sources.list: add install scripts

Closes #78
This commit is contained in:
Aminda Suomalainen 2015-07-12 11:26:47 +03:00
parent 2fd3c3986b
commit 8783d0d5b7
3 changed files with 50 additions and 0 deletions

View File

@ -10,9 +10,21 @@ the files work everywhere and the nearest mirrors are always used no matter
where you are. where you are.
Which script to use? Which script to use?
--------------------
* `install` for Ubuntu and Debian testing/unstable. * `install` for Ubuntu and Debian testing/unstable.
* If you run `ìnstall` on Debian Stable, sources.list will say * If you run `ìnstall` on Debian Stable, sources.list will say
`stable` and when new Debian becomes stable apt wants to `stable` and when new Debian becomes stable apt wants to
upgrade to it directly and that can be dangerous. upgrade to it directly and that can be dangerous.
* `install.debian` for not-rolling Debian. * `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`

View File

@ -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."

View File

@ -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."