Run commands repeatedly
This commit is contained in:
parent
e9b32586ab
commit
db8166fce8
1 changed files with 12 additions and 0 deletions
|
@ -78,6 +78,18 @@ function password-generator {
|
|||
echo $password
|
||||
}
|
||||
|
||||
function run {
|
||||
if [ $# -lt 2 ]; then
|
||||
echo Usage: run NUMBER COMMAND
|
||||
else
|
||||
number=$1; shift
|
||||
|
||||
for i in `seq $number`; do
|
||||
eval "$@"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function test-rails {
|
||||
if bundle exec rspec --help > /dev/null 2>&1; then
|
||||
if [ -d spec ]; then
|
||||
|
|
Loading…
Reference in a new issue