Compare commits

...

2 Commits
main ... dev

View File

@ -19,6 +19,29 @@ packages=(
"fuck" # Fuck error
)
# Check the operating system
if [[ $(uname -s) == "Linux" ]]; then
# Check if apt command is available
if command -v apt >/dev/null 2>&1; then
installer="apt"
elif command -v dnf >/dev/null 2>&1; then
installer="dnf"
else
echo "Unsupported Linux distribution. Please install packages manually."
exit 1
fi
elif [[ $(uname -s) == "Darwin" ]]; then
if command -v brew >/dev/null 2>&1; then
installer="brew"
else
echo "Homebrew is not installed on your system. Please install it manually."
exit 1
fi
else
echo "Unsupported operating system. Please install packages manually."
exit 1
fi
# Packages installation
clear
echo "Mise à jour de la liste des paquets..."
@ -26,7 +49,7 @@ echo " "
sudo apt update >/dev/null 2>&1
echo "Installation des paquets :"
for package in "${packages[@]}"; do
if apt install "$package" -y >/dev/null 2>&1; then
if $installer install "$package" -y >/dev/null 2>&1; then
echo -e " - Installation de $package : ${GREEN}ok${NC}"
else
echo -e " - Installation de $package : ${RED}échoué${NC}"
@ -34,7 +57,6 @@ for package in "${packages[@]}"; do
done
# Git Installation
mkdir ~/.zsh
if [ ! -d ~/.zsh ]; then
mkdir -p ~/.zsh
fi
@ -63,4 +85,5 @@ if [ ! -d ~/.config/neofetch ]; then
fi
cp -r ./neofetch/* ~/.config/neofetch
echo " - Mise en place de zsh par défaut (mot de passe nécessaire)"
chsh -s $(which zsh)
chsh -s $(which zsh) # Pour fedora, si chsh non installé : dnf install util-linux-user
zsh