-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
28 lines (25 loc) · 716 Bytes
/
Copy pathinstall.sh
File metadata and controls
28 lines (25 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# Détection du système d'exploitation
OS=$(uname)
INSTALL_DIR="install"
if [[ "$OS" == "Darwin" ]]; then
# Sur macOS
INSTALL_SCRIPT="$INSTALL_DIR/install_mac.scpt"
elif [[ "$OS" == "Linux" ]]; then
# Sur Linux
INSTALL_SCRIPT="$INSTALL_DIR/install_linux.sh"
elif [[ "$OS" == "MINGW" ]]; then
# Sur Windows (Git Bash)
INSTALL_SCRIPT="$INSTALL_DIR/install_windows.ps1"
else
echo "Système d'exploitation non pris en charge."
exit 1
fi
# Exécution du script d'installation approprié
if [ -f "$INSTALL_SCRIPT" ]; then
chmod +x "$INSTALL_SCRIPT"
"./$INSTALL_SCRIPT"
else
echo "Script d'installation non trouvé pour ce système d'exploitation."
exit 1
fi