Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Crées par moi même il permette d'installer des petit ou gros programme, mais a

## Usage

***
```bash
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/menu.sh)
```
***

***MARCHE UNIQUEMENT SUR LINUX***

* Prend le lien de n'importe quel script (requis `curl`)
Expand Down
85 changes: 85 additions & 0 deletions menu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash

# Définir les couleurs
GREEN=$(tput setaf 2)
RED=$(tput setaf 1)
BLUE=$(tput setaf 4)
VIOLET=$(tput setaf 5)
BOLD=$(tput bold)
RESET=$(tput sgr0)
########################################## INITIALISATION ROOT ##########################################

# Vérifier si l'utilisateur est root
if [[ $EUID -ne 0 ]]; then
echo "${RED}${BOLD}Ce script doit être exécuté en tant que root${RESET}"
# Demander le mot de passe
sudo "$0" "$@"
exit 1
fi

# Le reste du script ici

while true; do
# Affichage du menu
echo " +------------+"
echo " | Menu : |"
echo " +--------+------------+----------+"
echo " | Installation | "
echo "+------+--------------------------------+------+"
echo "| 1. Installer docker |"
echo "| 2. Installer yarn |"
echo "+----------------------------------------------+"
echo ""
echo " +-------------+"
echo " | Script : |"
echo " +-------------+------------ +--------------+"
echo " | 3. Exécuter 'new.sh' |"
echo " | |"
echo " | 4. Exécuter 'speedtest.sh' |"
echo " | |"
echo " | 5. Exécuter 'massgrave.cmd' |"
echo " +---------------------------+--------------+"
echo " | 6. Quitter |"
echo " +------------+"


# Lecture du choix de l'utilisateur
read -p "Choisissez une option (1-6) : " choix

# Traitement du choix
case $choix in

1)
echo "Installation de Docker."
# Ajoutez le code correspondant à l'Option 1 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/dockerinstall.sh)
;;
2)
echo "Installation de Yarn."
# Ajoutez le code correspondant à l'Option 2 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/yarninstall.sh)
;;
3)
echo "Exécution du script 'new.sh'."
# Ajoutez le code correspondant à l'Option 3 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/new.sh)
;;
4)
echo "Exécution du script 'speedtest.sh'."
# Ajoutez le code correspondant à l'Option 4 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/speedtest.sh)
;;
5)
echo "Exécution du script 'massgrave.cmd'."
# Ajoutez le code correspondant à l'Option 4 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/massgrave.cmd)
;;
6)
echo "Au revoir !"
exit 0
;;
*)
echo "Choix non valide. Veuillez entrer un numéro entre 1 et 5."
;;
esac
done