Mise a jour full-upgrade et Debian => Ubuntu

This commit is contained in:
Mylloon 2022-04-09 01:49:39 +02:00
parent 499a4fe234
commit c7760cc0a3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 11 additions and 7 deletions

View file

@ -8,8 +8,8 @@ then
which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed
which wget &> /dev/null || sudo apt install wget -y # install wget if not already installed
# === Upgrade and clean already installed packages ==
sudo apt full-upgrade -y
# === Upgrade packages ==
sudo apt upgrade -y
# === Basic dev ==
sudo apt install build-essential valgrind -y
@ -76,7 +76,7 @@ then
fish -c "abbr - 'cd -'"
fish -c "abbr cat 'batcat'"
fish -c "abbr nano 'micro'"
fish -c "abbr bigupdate 'sudo apt update && sudo apt full-upgrade -y && sudo snap refresh && tldr --update'"
fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh && tldr --update'"
fish -c "abbr d 'nautilus . -w &> /dev/null & disown'"
fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'"
# Remove fish icon

12
wsl.sh
View file

@ -6,7 +6,8 @@ then
sudo sed -i "s/focal/impish/g" /etc/apt/sources.list
sudo sed -i "s/focal/impish/g" /etc/apt/sources.list.d/*.list
sudo apt update
sudo apt full-upgrade -y
sudo apt upgrade -y
sudo apt purge needrestart # remove kernel update message (https://github.com/microsoft/WSL/issues/7054#issuecomment-864271333)
which git &> /dev/null || sudo apt install git -y # install git if not already installed
which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed
@ -79,7 +80,7 @@ then
fish -c "abbr - 'cd -'"
fish -c "abbr cat 'batcat'"
fish -c "abbr nano 'micro'"
fish -c "abbr bigupdate 'sudo apt update && sudo apt full-upgrade -y && tldr --update'"
fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && tldr --update'"
fish -c "abbr d 'explorer.exe .'"
# === GL4D ==
@ -155,10 +156,13 @@ then
# === Remove SU password ==
sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
# === Clear useless packages
sudo apt autoremove -y
echo -e "\nInstallation terminée.\nIl faut redémarrer WSL (dans Powershell : wsl -t Debian)."
echo -e "\nInstallation terminée.\nIl faut redémarrer WSL (dans Powershell : wsl -t Ubuntu)."
echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :"
printf "%s\n%s%s%s\n" "Ligne de commande : wsl.exe -d Debian fish" "Répertoire de démarrage : \\" "\wsl.localhost\Debian\home\\" "$USER"
printf "%s\n%s%s%s\n" "Ligne de commande : wsl.exe -d Debian fish" "Répertoire de démarrage (si besoin): \\" "\wsl.localhost\Ubuntu\home\\" "$USER"
echo "Jeu de couleur : One Half Dark"
else
echo "Ce script ne fonctionne que sur WSL (Debian)."