Files
Linux/modules/AutoInstall/autoinstall.ksh
T

97 lines
1.8 KiB
Bash
Executable File

#! /bin/bash
#--------------------------------------------
# Script autoinstallation et configuration Ubuntu/Debian
#--------------------------------------------
#variables
if [[ -z "${ROOT_DIR}" ]]; then
echo "Erreur : Veuillez lancer ce script via le menu.ksh principal."
exit 1
fi
dir_script=$(cd "$(dirname "$0")" && pwd)
#Chargement des couleurs (via la racine globale)
if [[ -f "${ROOT_DIR}/sources/couleurs.ksh" ]]; then
. "${ROOT_DIR}/sources/couleurs.ksh"
fi
# Chargement des fonctions locales
if [[ -f "${ROOT_DIR}/modules/AutoInstall/sources/fonctions.ksh" ]]; then
. "${ROOT_DIR}/modules/AutoInstall/sources/fonctions.ksh"
fi
# Recuperation de la distribution
if command -v lsb_release >/dev/null 2>&1; then
systeme=$(lsb_release -d | cut -c 14-)
else
systeme="${ROUGE}Inconnu${RESET}"
fi
#Affichage du Menu
clear
echo -e "${SOULIGNE}===== AUTOINSTALL =====${RESET} \n"
echo -e "Votre Systeme : ${BG_NOIR}${BLEU}${systeme}${RESET}"
echo ""
echo "Que voulez vous faire ? "
echo "[1] - Installation complete"
echo "[2] - Installer Nala"
echo "[3] - Installation Packages"
echo "[8] - Installer Atuin"
echo "[9] - Installer Zsh+Plugins"
echo "[0] - Quitter"
read reponse
case ${reponse} in
1)
maj_depot
maj_systeme
install_nala
install_packages
install_flatpaks
install_atuin
install_mainline
install_zsh
cp sources/conf/.p10k.zsh ${HOME}
cp sources/conf/.zshrc ${HOME}
#config_zsh
#config_alias
;;
2)
install_nala
;;
3)
install_packages
;;
8)
install_atuin
;;
9)
install_nerdfont
install_zsh
zsh
config_zsh
;;
0)
exit
;;
#Autre
*)
echo -e "${ROUGE}merci de repondre${RESET}"
read reponse
;;
esac