diff options
author | Jonas Smedegaard <dr@jones.dk> | 2007-11-02 13:33:04 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2007-11-02 13:33:04 +0100 |
commit | 0a47a506c73f56a003d478c6b27f147d2a2ecb31 (patch) | |
tree | aae9692f37697b0572ea256ab2bca35d4cb52f08 | |
parent | 6fa3064fb5115e91cce64ab56c0b3b5c14b8b368 (diff) |
Extend Makefile to support updating repositories with subsequent bare make invocations.
-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) |