Created
September 24, 2014 10:02
-
-
Save kstefanini/b22c9775fb19fc41c8f3 to your computer and use it in GitHub Desktop.
Debian non-free script - Writes sources.list in order to add non-free repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Writes sources.list in order to add non-free repository | |
# | |
DEBIAN_RELEASE=`cat /etc/*-release 2> /dev/null | grep PRETTY_NAME | awk -F "=" {'print $2'} | awk -F "(" {'print $2'} | awk -F ")" {'print $1'}` | |
echo "Writes /etc/apt/sources.list in order to add $DEBIAN_RELEASE non-free repository" | |
echo "# deb http://http.debian.net/debian $DEBIAN_RELEASE main" > /etc/apt/sources.list | |
echo "" >> /etc/apt/sources.list | |
echo "deb http://http.debian.net/debian $DEBIAN_RELEASE main contrib non-free" >> /etc/apt/sources.list | |
echo "deb-src http://http.debian.net/debian $DEBIAN_RELEASE main contrib non-free" >> /etc/apt/sources.list | |
echo "" >> /etc/apt/sources.list | |
echo "deb http://security.debian.org/ $DEBIAN_RELEASE/updates main contrib non-free" >> /etc/apt/sources.list | |
echo "deb-src http://security.debian.org/ $DEBIAN_RELEASE/updates main contrib non-free" >> /etc/apt/sources.list | |
echo "" >> /etc/apt/sources.list | |
echo "# $DEBIAN_RELEASE-updates, previously known as "volatile"" >> /etc/apt/sources.list | |
echo "deb http://http.debian.net/debian $DEBIAN_RELEASE-updates main contrib non-free" >> /etc/apt/sources.list | |
echo "deb-src http://http.debian.net/debian $DEBIAN_RELEASE-updates main contrib non-free" >> /etc/apt/sources.list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment