#!/bin/bash

while [ true ]; do
    for task in *.sh; do
        if [ "$task" == "*.sh" ] || [ ! -x "$task" ]; then
            continue
        fi

        ./$task &> ${task}.log

        if [ $? -ne 0 ]; then
            echo "$task failure"
            echo "Please read ${task}.log and press ENTER for continue"
            read
        else
            echo "$task success"
        fi

        rm $task
    done
    sleep 1
done
