-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmake.sh
More file actions
executable file
·49 lines (40 loc) · 1.18 KB
/
Copy pathmake.sh
File metadata and controls
executable file
·49 lines (40 loc) · 1.18 KB
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
45
46
47
48
49
#!/usr/bin/env bash
set -euo pipefail
set -x
if [ -f ".local-env" ]; then
set -a
# shellcheck disable=SC1091
. ./.local-env
set +a
fi
if [ "${HUGO_BIN:-}" = "" ]; then
if [ -x "./hugo" ]; then
HUGO_BIN="./hugo"
else
HUGO_BIN="$(command -v hugo)"
fi
fi
# Regenerate dynamic homepage community data before the Hugo build.
if [ "${SKIP_COMMUNITY_DATA:-}" != "1" ]; then
python3 scripts/fetch-home-community-data.py
fi
# Regenerate the donate page funds before the Hugo build.
if [ "${SKIP_DONATION_FUNDS:-}" != "1" ]; then
python3 scripts/fetch-donation-funds.py
fi
# Fetch the current month's WIP screenshot thread from the forum.
if [ "${SKIP_MONTHLY_WIP:-}" != "1" ]; then
python3 scripts/fetch-monthly-wip-data.py
fi
if [ "${SKIP_SHOWCASE_MASHUP:-}" != "1" ]; then
SHOWCASE_MASHUP_MAX_IMAGES="${SHOWCASE_MASHUP_MAX_IMAGES:-30}"
python3 scripts/generate-showcase-mashup-gif.py --max-width 1600 --max-images "$SHOWCASE_MASHUP_MAX_IMAGES"
fi
if [ "${DONT_COMPILE_LESS:-}" = "" ]; then
lessc static/css/style.less static/css/style.css
fi
if [ "${1:-}" = "server" ]; then
"$HUGO_BIN" "$@" --bind 0.0.0.0
else
"$HUGO_BIN" "$@"
fi