30 lines
416 B
Plaintext
30 lines
416 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
function cmd {
|
||
|
_dc php-fpm "${@}"
|
||
|
}
|
||
|
|
||
|
function composer {
|
||
|
cmd composer "${@}"
|
||
|
}
|
||
|
|
||
|
function drush {
|
||
|
cmd php vendor/bin/drush "${@}"
|
||
|
}
|
||
|
|
||
|
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"
|
||
|
}
|
||
|
|
||
|
function _dc {
|
||
|
docker-compose run --rm "${@}"
|
||
|
}
|
||
|
|
||
|
eval "${@:-help}"
|