summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-10 00:57:49 -0400
committerKylie McClain <kylie@somas.is>2020-07-10 00:57:49 -0400
commit74aaa49bbaebaeae6f60fa950b4ce81e199a10ed (patch)
treeda4216927d8f0476b1d5ec9bff3ea2fa68390f3d
parentabc40e64de1310c32426a65229720f21e6c1badb (diff)
downloadmeta-74aaa49bbaebaeae6f60fa950b4ce81e199a10ed.tar.gz
meta-74aaa49bbaebaeae6f60fa950b4ce81e199a10ed.tar.xz
meta-74aaa49bbaebaeae6f60fa950b4ce81e199a10ed.zip
site.sh: be incremental to allow for quick building
-rw-r--r--site.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/site.sh b/site.sh
index 44eda96..ff32502 100644
--- a/site.sh
+++ b/site.sh
@@ -2,9 +2,9 @@
set -e
-rm -rf site
mkdir -p site
+: "${MAKE:=make}"
: "${COMBINES:=
https://git.mutiny.red/mutiny/idioms
https://git.mutiny.red/mutiny/filesystem
@@ -13,24 +13,28 @@ mkdir -p site
for d in ${COMBINES}; do
name="${d##*/}"; name="${name%%.git}"
- git clone --depth=1 "${d}" site/"${name}"
- touch site/"${name}"/config.mk
- [ -f ./config.mk ] && cat ./config.mk >> site/"${name}"/config.mk
- ln -sf ../config.mk site/"${name}"/config.mk
+ [ -d site/"${name}" ] || git clone --depth=1 "${d}" site/"${name}"
+ if ! [ -f site/"${name}"/config.mk ]; then
+ touch site/"${name}"/config.mk
+ [ -f ./config.mk ] && cat ./config.mk >> site/"${name}"/config.mk
+ ln -sf ../config.mk site/"${name}"/config.mk
+ fi
done
-while [ $# -gt 0 ]; do
- printf 'ASCIIDOCTOR_FLAGS += "%s"\n' "$1" >> site/config.mk
- shift
-done
+if ! [ -f site/config.mk ]; then
+ while [ $# -gt 0 ]; do
+ printf 'ASCIIDOCTOR_FLAGS += "%s"\n' "$1" >> site/config.mk
+ shift
+ done
+fi
for d in .. ${COMBINES}; do
name="${d##*/}"; name="${name%%.git}"
- make -C site/"${name}" html
+ ${MAKE} ${MAKEFLAGS} -C site/"${name}" html
done
for d in .. ${COMBINES}; do
name="${d##*/}"; name="${name%%.git}"
- make -C site/"${name}" install-html DESTDIR="${PWD}"/site/generated htmldir=/
+ ${MAKE} ${MAKEFLAGS} -C site/"${name}" install-html DESTDIR="${PWD}"/site/generated htmldir=/
done