Skip to content

Instantly share code, notes, and snippets.

@bzar
Created January 22, 2015 15:19
Show Gist options
  • Save bzar/f1ab01a7edb0baae323c to your computer and use it in GitHub Desktop.
Save bzar/f1ab01a7edb0baae323c to your computer and use it in GitHub Desktop.
#!/bin/bash
COMMAND=$1
TESTLIST=$2
DONELIST=$3
touch "$DONELIST"
while read TEST; do
if [ -z "$TEST" ]; then
echo
elif grep --quiet -e "$TEST" "$DONELIST"; then
echo "Skipping $TEST"
else
echo "Testing: $COMMAND $TEST"
read < /dev/tty
eval $COMMAND $TEST
echo "$TEST" >> "$DONELIST"
echo "done"
fi
done < "$TESTLIST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment