projects
/
cmccabe-bin
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add audible-to-mp3.sh
[cmccabe-bin]
/
ttd
1
#!/usr/bin/env bash
2
3
#
4
# ttd: run a command until it fails.
5
#
6
# usage: ttd [num-runs] command
7
#
8
9
NUM_RUNS=$1
10
shift
11
CMD="${@}"
12
for i in `seq 1 $NUM_RUNS`; do
13
${CMD}
14
if [ $? -ne 0 ]; then
15
exit 1
16
fi
17
done
18
19
echo "*** SUCCESSFULLY RAN ${NUM_RUNS} RUNS ***"