optimisation code + creation dossier source
This commit is contained in:
1 parent
17a20ed81a
commit
840a7c3e6b
2 files changed
+136
-83
No files matched your search
+14
-83
@@ -1,88 +1,19 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
set -eou pipefail
|
||||||
|
|
||||||
#--------------------------------------------
|
#--------------------------------------------
|
||||||
# Script autoinstallation et configuration Ubuntu
|
# Script autoinstallation et configuration Ubuntu/Debian
|
||||||
#--------------------------------------------
|
#--------------------------------------------
|
||||||
#Actualisation depots
|
|
||||||
apt update
|
|
||||||
|
|
||||||
# Maj Systeme avant AutoInstall
|
fonctions_sources="./sources/fonctions.ksh"
|
||||||
apt update && apt full-upgrade -y
|
|
||||||
|
|
||||||
#Installation NALA
|
if [[ -f "${fonctions_sources}" ]]; then
|
||||||
curl https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh | bash
|
{
|
||||||
|
. ./sources/fonctions.ksh
|
||||||
# MAJ Systeme
|
}
|
||||||
nala full-upgrade -y
|
else
|
||||||
|
{
|
||||||
#Installation Packages
|
echo "Erreur : Impossible de charger les sources ${fonctions_sources}"
|
||||||
apt install btop httpie lsd -y
|
exit 1
|
||||||
|
}
|
||||||
#Telechargement Nerdfonts (Police Hackfont, la plus lisible)
|
fi
|
||||||
mkdir -p ~/.local/share/fonts/
|
|
||||||
|
|
||||||
#Installation de la Police
|
|
||||||
http -o ~/.local/share/fonts/Hack.zip --download https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Hack.zip
|
|
||||||
unzip ~/.local/share/fonts/Hack.zip
|
|
||||||
rm ~/.local/share/fonts/Hack.zip
|
|
||||||
|
|
||||||
#Mise a jour des polices
|
|
||||||
fc-cache -f
|
|
||||||
|
|
||||||
|
|
||||||
# 12/01/2026 desactivation des flatpak, ces derniers sont installables directement dans les depots de bases.
|
|
||||||
#Installation Flatpak
|
|
||||||
#add-apt-repository ppa:flatpak/stable -y
|
|
||||||
nala install flatpak -y
|
|
||||||
nala install gnome-software-plugin-flatpak -y
|
|
||||||
#flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
||||||
|
|
||||||
#Installation Fastfetch
|
|
||||||
add-apt-repository ppa:zhangsongcui3371/fastfetch -y
|
|
||||||
nala install fastfetch -y
|
|
||||||
|
|
||||||
|
|
||||||
#Installation Packages Flatpak
|
|
||||||
# <a faire plus tard>
|
|
||||||
|
|
||||||
#Installation Mainline
|
|
||||||
add-apt-repository ppa:cappelikan/ppa -y
|
|
||||||
nala install mainline -y
|
|
||||||
|
|
||||||
#Installation Atuin
|
|
||||||
bash <(curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh)
|
|
||||||
|
|
||||||
#Installation ZSH
|
|
||||||
nala install zsh -y
|
|
||||||
|
|
||||||
#Configuration zsh+plugins
|
|
||||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
#Installation Plugin ZSH
|
|
||||||
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
|
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
|
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/powerlevel10k
|
|
||||||
|
|
||||||
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
|
|
||||||
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
|
|
||||||
echo "source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc
|
|
||||||
|
|
||||||
# pré-chargement fichier zsh configure
|
|
||||||
#source ~/.zshrc
|
|
||||||
|
|
||||||
#Configuration megacommande maj"
|
|
||||||
echo "alias maj='nala full-upgrade && flatpak upgrade && mainline install-latest && update-grub'" >> ~/.zshrc
|
|
||||||
|
|
||||||
#Configuration des alias des commandes
|
|
||||||
echo "alias ll='lsd -ltr'" >> ~/.zshrc
|
|
||||||
echo "alias wget='http --download'" >> ~/.zshrc
|
|
||||||
echo "alias du='duf' " >> ~/.zshrc
|
|
||||||
|
|
||||||
#Relancer la config de zsh
|
|
||||||
#p10k configure
|
|
||||||
|
|
||||||
#Reboot
|
|
||||||
# Ajouter un reboot a la fin
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo "Installation Terminee"
|
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eou pipefail
|
||||||
|
|
||||||
|
function maj_depot
|
||||||
|
{
|
||||||
|
#Actualisation depots
|
||||||
|
apt update
|
||||||
|
|
||||||
|
# Maj Systeme avant AutoInstall
|
||||||
|
apt full-upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function maj_systeme
|
||||||
|
{
|
||||||
|
nala full-upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
function maj_packages
|
||||||
|
{
|
||||||
|
nala upgrade -y
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_nala
|
||||||
|
{
|
||||||
|
#Installation NALA
|
||||||
|
curl https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh | bash
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_nerdfont
|
||||||
|
{
|
||||||
|
#Telechargement Nerdfonts (Police Hackfont, la plus lisible)
|
||||||
|
mkdir -p ~/.local/share/fonts/
|
||||||
|
|
||||||
|
#Installation de la Police
|
||||||
|
http -o ~/.local/share/fonts/Hack.zip --download https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Hack.zip
|
||||||
|
unzip ~/.local/share/fonts/Hack.zip
|
||||||
|
rm ~/.local/share/fonts/Hack.zip
|
||||||
|
|
||||||
|
#Mise a jour des polices
|
||||||
|
fc-cache -f
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_packages
|
||||||
|
{
|
||||||
|
add-apt-repository ppa:zhangsongcui3371/fastfetch -y
|
||||||
|
nala install btop httpie fastfetch
|
||||||
|
snap install lsd
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_flatpaks
|
||||||
|
{
|
||||||
|
# 12/01/2026 desactivation des flatpak, ces derniers sont installables directement dans les depots de bases.
|
||||||
|
#Installation Flatpak
|
||||||
|
#add-apt-repository ppa:flatpak/stable -y
|
||||||
|
nala install flatpak -y
|
||||||
|
nala install gnome-software-plugin-flatpak -y
|
||||||
|
#flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
|
#Installation Packages Flatpak
|
||||||
|
# <a faire plus tard>
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_mainline
|
||||||
|
{
|
||||||
|
#Installation Mainline
|
||||||
|
add-apt-repository ppa:cappelikan/ppa -y
|
||||||
|
nala install mainline -y
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_atuin
|
||||||
|
{
|
||||||
|
#Installation Atuin
|
||||||
|
bash <(curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh)
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_zsh
|
||||||
|
# ainsi que les plugins
|
||||||
|
{
|
||||||
|
nala install zsh -y
|
||||||
|
|
||||||
|
#Configuration zsh+plugins
|
||||||
|
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
|
|
||||||
|
#Installation Plugin ZSH
|
||||||
|
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/powerlevel10k
|
||||||
|
|
||||||
|
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
|
||||||
|
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
|
||||||
|
echo "source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc
|
||||||
|
|
||||||
|
# pré-chargement fichier zsh configure
|
||||||
|
#source ~/.zshrc
|
||||||
|
}
|
||||||
|
|
||||||
|
function config_alias
|
||||||
|
{
|
||||||
|
#Configuration megacommande maj"
|
||||||
|
echo "alias maj='nala full-upgrade && flatpak upgrade && mainline install-latest && update-grub'" >> ~/.zshrc
|
||||||
|
|
||||||
|
#Configuration des alias des commandes
|
||||||
|
echo "alias ll='lsd -ltr'" >> ~/.zshrc
|
||||||
|
echo "alias wget='http --download'" >> ~/.zshrc
|
||||||
|
echo "alias du='duf' " >> ~/.zshrc
|
||||||
|
}
|
||||||
|
|
||||||
|
function config_zsh
|
||||||
|
{
|
||||||
|
#Relancer la config de zsh
|
||||||
|
p10k configure
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_fonction
|
||||||
|
{
|
||||||
|
clear
|
||||||
|
echo "TEST OK"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user