Skip to content

Use $os_name instead of the invalid $os in readme.md #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,21 @@ source <(curl -sL https://raw.githubusercontent.com/mdeacey/universal-os-detecto
run_detection

# Use the detection results
if [ "$os" = "Linux" ]; then
if [ "$os_name" = "Linux" ]; then
echo "This is a Linux system. Running Linux-specific commands..."
# Add your Linux-specific commands here
elif [ "$os" = "MacOS" ]; then
elif [ "$os_name" = "MacOS" ]; then
echo "This is a MacOS system. Running MacOS-specific commands..."
# Add your MacOS-specific commands here
elif [ "$os" = "Windows" ]; then
elif [ "$os_name" = "Windows" ]; then
echo "This is a Windows system. Running Windows-specific commands..."
# Add your Windows-specific commands here
else
echo "Unknown operating system: $os"
echo "Unknown operating system: $os_name"
fi

# Check for specific distributions
if [ "$os" = "Linux" ] && [[ "$distro_name" == *"Ubuntu"* ]]; then
if [ "$os_name" = "Linux" ] && [[ "$distro_name" == *"Ubuntu"* ]]; then
echo "This is an Ubuntu system. Running Ubuntu-specific commands..."
# Add your Ubuntu-specific commands here
fi
Expand Down