Skip to content

Instantly share code, notes, and snippets.

@sdr01810
Created October 26, 2017 16:48
Show Gist options
  • Save sdr01810/a560f3a56fd41d8c20e953886405bb32 to your computer and use it in GitHub Desktop.
Save sdr01810/a560f3a56fd41d8c20e953886405bb32 to your computer and use it in GitHub Desktop.
Shell function check_git_is_installed() and friends.
function check_git_is_installed() {
if ! git_is_installed ; then
post_delayed_exit 2 "Cannot locate the git command; aborting."
fi
}
function git_is_installed() {
command -v git >/dev/null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment