Skip to content

Commit a13ec67

Browse files
committed
Added main bash script that detects OS
1 parent 138d3b6 commit a13ec67

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

setup.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Detect the operating system
4+
os_name="$(uname -s)"
5+
6+
# Define the paths to the OS-specific scripts
7+
script_mac="./setup_mac.sh"
8+
script_linux="./setup_ubuntu_local.sh"
9+
10+
# Execute the appropriate script based on the operating system
11+
case "$os_name" in
12+
Darwin)
13+
echo "Detected macOS. Executing Mac setup script..."
14+
chmod u+x "$script_mac" # Ensure the script is executable
15+
./"$script_mac"
16+
;;
17+
Linux)
18+
echo "Detected Linux. Executing Linux setup script..."
19+
chmod u+x "$script_linux" # Ensure the script is executable
20+
./"$script_linux"
21+
;;
22+
*)
23+
echo "Unsupported operating system: $os_name"
24+
exit 1
25+
;;
26+
esac

0 commit comments

Comments
 (0)