Mise a jour de l'OS avant de tout installer

This commit is contained in:
Mylloon 2022-04-09 01:17:44 +02:00
parent d2ebad2699
commit bb9a30172d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

14
wsl.sh
View file

@ -2,20 +2,22 @@
if grep "WSL" /proc/version > /dev/null; if grep "WSL" /proc/version > /dev/null;
then then
# === Update Ubuntu ==
sudo sed -i "s/bullseye/bullseye/g" /etc/apt/sources.list
sudo sed -i "s/bullseye/bullseye/g" /etc/apt/sources.list.d/*.list
sudo apt update sudo apt update
sudo apt full-upgrade -y
which git &> /dev/null || sudo apt install git -y # install git if not already installed 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 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 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
# === Basic dev == # === Basic dev ==
sudo apt install build-essential valgrind -y sudo apt install build-essential valgrind -y
# === Fish == # === Fish ==
sudo apt-add-repository ppa:fish-shell/release-3 -y sudo apt-add-repository ppa:fish-shell/release-3 -y
sudo apt update
sudo apt install fish fzf bat procps exa micro -y sudo apt install fish fzf bat procps exa micro -y
cd /usr/local/bin || exit cd /usr/local/bin || exit
curl https://getmic.ro | sudo GETMICRO_PLATFORM=linux64 bash curl https://getmic.ro | sudo GETMICRO_PLATFORM=linux64 bash
@ -153,12 +155,6 @@ then
# === Remove SU password == # === Remove SU password ==
sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
# === Update Debian ==
# sudo sed -i "s/bullseye/bullseye/g" /etc/apt/sources.list
# sudo sed -i "s/bullseye/bullseye/g" /etc/apt/sources.list.d/*.list
# Make the update
# sudo apt update
# sudo apt full-upgrade -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 Debian)."
echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :" echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :"