Skip to content

Instantly share code, notes, and snippets.

@fcamel
Created September 16, 2011 02:36
Show Gist options
  • Save fcamel/1221046 to your computer and use it in GitHub Desktop.
Save fcamel/1221046 to your computer and use it in GitHub Desktop.
Good code snippet to run or die in shell script.
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
DIE=1
}
autoconf || exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment