#!/usr/bin/env bash

while :; do
    "$@"

    if [ $? -ne 0 ]; then
        exit $?
    fi
done