summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 9775eb1..b2072eb 100644
--- a/Makefile
+++ b/Makefile
@@ -19,10 +19,16 @@ all: $(underlays) $(dummies)
$(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@))
$(underlays): underlay=$(@:%_l10n/$(locale)=%)
$(underlays):
- mkdir -p $@
- cd $@ && git init
- cd $@ && git remote add -f -t $(master) -m $(master) origin $(origin)
- cd $@ && git merge origin
+ @mkdir -p $@
+ @if [ -d "$@/.git" ]; then \
+ cd $@ && \
+ git pull; \
+ else \
+ cd $@ && \
+ git init && \
+ git remote add -f -t $(master) -m $(master) origin $(origin) && \
+ git merge origin; \
+ fi
$(dummies):
mkdir -p $@
@@ -32,3 +38,5 @@ ultraclean:
rm -rf $(underlays)
rm -rf $(dir $(underlays_l10n))
rm -rf $(dummies)
+
+.PHONY: $(underlays)