Add option to make a snapshot tar archive - susmb - mounting of SMB/CIFS shares… | |
git clone git://git.codemadness.org/susmb | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 250da8dcb1e4a2a4db76530a7ab7070b8b823bf5 | |
parent 61d33e230e42e8f05a5df87fbfd440bd241a946d | |
Author: Michal Suchanek <[email protected]> | |
Date: Sun, 14 Mar 2010 22:58:18 +0100 | |
Add option to make a snapshot tar archive | |
Diffstat: | |
M Makefile.in | 12 ++++++++++-- | |
1 file changed, 10 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/Makefile.in b/Makefile.in | |
@@ -69,11 +69,19 @@ uninstall: | |
dist: tar | |
-tar: VERSION=$(shell grep 'USMB_VERSION[^_]' version.h | sed 's/.*0x//') | |
+ifeq ($(SNAPSHOT),) | |
+ VERSION = $(shell grep 'USMB_VERSION[^_]' version.h | sed 's/.*0x//') | |
+ ARCHIVE = $(VERSION) | |
+else | |
+ ARCHIVE = $(shell git log -n1 | head -n1 | cut -d' ' -f2 | cut -c1-8) | |
+ commitdate = $( | |
+ VERSION = $(shell date -ud "$(shell git log -n 1 | grep ^Date | sed -e 's,^D… | |
+endif | |
+ | |
tar: STAGING=/tmp/usmb-$(VERSION) | |
tar: | |
mkdir $(STAGING) | |
- git archive $(VERSION) | tar -C $(STAGING) -x -f - | |
+ git archive $(ARCHIVE) | tar -C $(STAGING) -x -f - | |
git log > $(STAGING)/Changelog | |
(cd $(STAGING) && \ | |
autoreconf && \ |