diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-01-23 16:56:35 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-01-23 16:56:35 +0000 |
commit | d67437e5db32ab9871d8efe59bec3a74647c340f (patch) | |
tree | 83046e8db5fd9471d9310bcb15a18d7564cf8ca7 /images | |
parent | 1938644698842333b83f854979598d9716819ca5 (diff) | |
download | drakx-backup-do-not-use-d67437e5db32ab9871d8efe59bec3a74647c340f.tar drakx-backup-do-not-use-d67437e5db32ab9871d8efe59bec3a74647c340f.tar.gz drakx-backup-do-not-use-d67437e5db32ab9871d8efe59bec3a74647c340f.tar.bz2 drakx-backup-do-not-use-d67437e5db32ab9871d8efe59bec3a74647c340f.tar.xz drakx-backup-do-not-use-d67437e5db32ab9871d8efe59bec3a74647c340f.zip |
Add git support (for git-svn) to make tar
Diffstat (limited to 'images')
-rw-r--r-- | images/Makefile | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/images/Makefile b/images/Makefile index ed8f2f012..19e8756e9 100644 --- a/images/Makefile +++ b/images/Makefile @@ -19,14 +19,25 @@ images: all.kernels all.kernels: update_kernel ../kernel/list_modules.pm ./update_kernel $(KERNELS) +dist: tar tar: - rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION) - mkdir -p $(PRODUCT)-$(VERSION) - svn export -q -rBASE . $(PRODUCT)-$(VERSION)/images - svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel - cp ../Makefile.config $(PRODUCT)-$(VERSION)/ - tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION) - rm -rf $(PRODUCT)-$(VERSION) + @rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION) + @if [ -e ".svn" ]; then \ + mkdir -p $(PRODUCT)-$(VERSION); \ + svn export -q -rBASE . $(PRODUCT)-$(VERSION)/images; \ + svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel; \ + cp ../Makefile.config $(PRODUCT)-$(VERSION)/; \ + tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION); \ + rm -rf $(PRODUCT)-$(VERSION); \ + elif [ -e "../.git" ]; then \ + pushd .. &>/dev/null; \ + git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD images kernel Makefile.config | bzip2 >images/$(PRODUCT)-$(VERSION).tar.bz2; \ + popd &>/dev/null; \ + else \ + echo "Unknown SCM (not SVN nor GIT)";\ + exit 1; \ + fi; + $(info $(PRODUCT)-$(VERSION).tar.bz2 is ready) clean: rm -rf images isolinux all.kernels modules.description |