summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-10 08:39:38 -0400
committerKylie McClain <kylie@somas.is>2020-07-10 08:39:38 -0400
commit298162dd87d161104099ba769045bb3b907a627b (patch)
tree9a22bf5942cfbbf1ab7e19ffb8cc639fd70a733f
parentd285f07dae5f13bd86a88571b9b669c84df69861 (diff)
downloadmeta-298162dd87d161104099ba769045bb3b907a627b.tar.gz
meta-298162dd87d161104099ba769045bb3b907a627b.tar.xz
meta-298162dd87d161104099ba769045bb3b907a627b.zip
site.sh: pull if repo already cloned
-rw-r--r--site.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/site.sh b/site.sh
index 75c672a..cc32ea4 100644
--- a/site.sh
+++ b/site.sh
@@ -13,7 +13,12 @@ mkdir -p site
for d in ${COMBINES}; do
name="${d##*/}"; name="${name%%.git}"
- [ -d site/"${name}" ] || git clone --depth=1 "${d}" site/"${name}"
+ if [ -d site/"${name}" ]; then
+ git -C site/"${name}" pull
+ else
+ git clone --depth=1 "${d}" site/"${name}"
+ fi
+
if ! [ -f site/"${name}"/config.mk ]; then
touch site/"${name}"/config.mk
[ -f ./config.mk ] && cat ./config.mk >> site/"${name}"/config.mk