-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added main bash script that detects OS
- Loading branch information
1 parent
138d3b6
commit a13ec67
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Detect the operating system | ||
os_name="$(uname -s)" | ||
|
||
# Define the paths to the OS-specific scripts | ||
script_mac="./setup_mac.sh" | ||
script_linux="./setup_ubuntu_local.sh" | ||
|
||
# Execute the appropriate script based on the operating system | ||
case "$os_name" in | ||
Darwin) | ||
echo "Detected macOS. Executing Mac setup script..." | ||
chmod u+x "$script_mac" # Ensure the script is executable | ||
./"$script_mac" | ||
;; | ||
Linux) | ||
echo "Detected Linux. Executing Linux setup script..." | ||
chmod u+x "$script_linux" # Ensure the script is executable | ||
./"$script_linux" | ||
;; | ||
*) | ||
echo "Unsupported operating system: $os_name" | ||
exit 1 | ||
;; | ||
esac |