Skip to content

Commit 6f20c37

Browse files
AnkanSahaCopilot
andauthored
Update setup.sh
Co-authored-by: Copilot <[email protected]>
1 parent f3ee4ac commit 6f20c37

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

setup.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ EOF
6666
install_docker() {
6767
print_info "Installing Docker and Docker Compose..."
6868

69+
# Detect operating system
70+
if [ -f /etc/os-release ]; then
71+
. /etc/os-release
72+
if [[ "$ID" != "ubuntu" && "$ID" != "debian" ]]; then
73+
print_error "Unsupported operating system: $ID. This script supports only Ubuntu/Debian-based systems."
74+
exit 1
75+
fi
76+
else
77+
print_error "Unable to detect operating system. This script supports only Ubuntu/Debian-based systems."
78+
exit 1
79+
fi
80+
6981
# Update package index
7082
sudo apt-get update
7183

0 commit comments

Comments
 (0)