diff options
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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) |