Skip to content

Instantly share code, notes, and snippets.

@deven96
Created March 19, 2021 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deven96/a13d9c3356dc0be27b3ca32145e5edd5 to your computer and use it in GitHub Desktop.
Save deven96/a13d9c3356dc0be27b3ca32145e5edd5 to your computer and use it in GitHub Desktop.
Check OS
#!/bin/bash
function checkOS {
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
*) echo "Cannot run on unsupported machine ${unameOut}" && exit 1;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment