mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +01:00
parent
e1143ca6ca
commit
b1a9ac28dc
34
rc/bashrc
34
rc/bashrc
@ -726,7 +726,6 @@ cd
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This function will download and install sources.list.
|
# This function will download and install sources.list.
|
||||||
|
|
||||||
function sources-list-install {
|
function sources-list-install {
|
||||||
|
|
||||||
export RELEASE=$(lsb_release -sr)
|
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.
|
# This function fixes nodejs on Debian based systems.
|
||||||
# (Everything expects nodejs to be called as node, but it's not with Debian.)
|
# (Everything expects nodejs to be called as node, but it's not with Debian.)
|
||||||
fix-node () {
|
fix-node () {
|
||||||
|
33
rc/zshrc
33
rc/zshrc
@ -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.
|
# This function fixes nodejs on Debian based systems.
|
||||||
# (Everything expects nodejs to be called as node, but it's not with Debian.)
|
# (Everything expects nodejs to be called as node, but it's not with Debian.)
|
||||||
function fix-node {
|
function fix-node {
|
||||||
|
Loading…
Reference in New Issue
Block a user