4coder/code/bin/detect_os.sh

10 lines
134 B
Bash
Executable File

#!/bin/bash
os="unknown"
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "mac"
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "linux"
fi