Skip to content

Commit

Permalink
Added main bash script that detects OS
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebrownlee committed Apr 22, 2024
1 parent 138d3b6 commit a13ec67
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions setup.sh
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

0 comments on commit a13ec67

Please sign in to comment.