Skip to content

Instantly share code, notes, and snippets.

@just3ws
Created March 7, 2014 04:02
Show Gist options
  • Save just3ws/9405033 to your computer and use it in GitHub Desktop.
Save just3ws/9405033 to your computer and use it in GitHub Desktop.
Some checks for common env settings that are useful in ZSH scripts.
# checks (stolen from zshuery)
if [[ $(uname) = 'Linux' ]]; then
IS_LINUX=1
fi
if [[ $(uname) = 'Darwin' ]]; then
IS_MAC=1
fi
if [[ -x `which brew` ]]; then
HAS_BREW=1
fi
if [[ -x `which apt-get` ]]; then
HAS_APT=1
fi
if [[ -x `which yum` ]]; then
HAS_YUM=1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment