4coder/custom/bin/detect_os.sh

10 lines
134 B
Bash

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