-
Notifications
You must be signed in to change notification settings - Fork 1
/
run
executable file
·44 lines (31 loc) · 893 Bytes
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
set -o errexit
set -o nounset
set -o pipefail
PATH="${PATH}:./vendor/bin"
# Generate the site.
function generate {
local args=()
if [[ "${APP_ENV:-}" == "prod" ]]; then
args=(--env="prod")
else
args=(--server --watch)
fi
sculpin generate "${args[@]}" "${@}"
}
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"
}
# Start the project.
function start {
sculpin generate --server --watch "${@}"
}
# Include any local tasks.
# https://stackoverflow.com/a/6659698
[[ -e "${BASH_SOURCE%/*}/run.local" ]] && source "${BASH_SOURCE%/*}/run.local"
TIMEFORMAT="Task completed in %3lR"
time "${@:-help}"
# vim: ft=bash