Skip to content

Instantly share code, notes, and snippets.

@jredville
Last active August 24, 2018 17:56
Show Gist options
  • Save jredville/d9cb9bdf19844647ff63d6470230978e to your computer and use it in GitHub Desktop.
Save jredville/d9cb9bdf19844647ff63d6470230978e to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
base_dir=${$base_dir:=/opt/app}
pre_run=$base_dir/pre_run
$pre_run check || ($pre_run foo && $pre_run baz)
retval=$?
if [ $retval -ne 0 ]; then
exit $retval
fi
exec $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment