summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1284f6d)
add a preflight function and check stuff is there before we use it
+preflight() {
+ # Check a few requirements before doing any work
+ errors=0
+ set +e
+ for binary in mr git; do
+ bin=$(which ${binary})
+ if [ -z "${bin}" ]; then
+ echo "Missing required program: ${binary}"
+ errors=$(( errors + 1 ))
+ fi
+ done
+ set -e
+ if [ $errors -ne 0 ]; then
+ echo "Errors found, exiting"
+ exit 2
+ fi
+}
+
if [ $# -lt 1 ]; then
usage
exit 1
if [ $# -lt 1 ]; then
usage
exit 1