24 lines
442 B
Bash
Executable file
24 lines
442 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
|
|
PATH=${PATH}:./vendor/bin
|
|
|
|
# Display a list of all available commands.
|
|
function help {
|
|
printf "%s <task> [args]\n\nTasks:\n" "${0}"
|
|
|
|
compgen -A function | grep -v "^_" | cat -n
|
|
|
|
printf "\nExtended help:\n Each task has comments for general usage\n"
|
|
}
|
|
|
|
# Run PHPUnit tests.
|
|
function test {
|
|
paratest --group lessons "${@}"
|
|
}
|
|
|
|
TIMEFORMAT=$'\nTask completed in %3lR'
|
|
time "${@:-help}"
|