rc: sources-list-install-debian

ref #78
This commit is contained in:
Aminda Suomalainen 2015-07-12 11:01:45 +03:00
parent e1143ca6ca
commit b1a9ac28dc
2 changed files with 66 additions and 1 deletions

View File

@ -726,7 +726,6 @@ cd
}
# This function will download and install sources.list.
function sources-list-install {
export RELEASE=$(lsb_release -sr)
@ -759,6 +758,39 @@ echo "I have now finished everything that I was supposed to do."
}
# Same for Debian (codename instead of release)
function sources-list-install-debian {
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
#\curl -L ${a[1]} >> /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."
}
# This function fixes nodejs on Debian based systems.
# (Everything expects nodejs to be called as node, but it's not with Debian.)
fix-node () {

View File

@ -746,6 +746,39 @@ echo "I have now finished everything that I was supposed to do."
}
# Same for Debian (codename instead of release)
function sources-list-install-debian {
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
#\curl -L ${a[1]} >> /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."
}
# This function fixes nodejs on Debian based systems.
# (Everything expects nodejs to be called as node, but it's not with Debian.)
function fix-node {