[m-rev.] diff: exclude .git directory from source diet

Julien Fischer jfischer at opturion.com
Fri Jan 4 16:39:20 AEDT 2013


Exclude the .git directory from the source distribution.

Mmakefile:
     As above.  (I know that GNU tar has an --exclude-vcs
     option, but the BSD one doesn't.)

Julien.

diff --git a/Mmakefile b/Mmakefile
index 60cfd04..33d31f6 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -478,7 +478,7 @@ tar: 	$(GENERATED_DOCS)
 		mv $$ROOTNAME/extras/quickcheck stuff-to-exclude;	\
 		mv $$ROOTNAME/extras	mercury-extras-$(VERSION);	\
 		mv $$ROOTNAME		mercury-compiler-$(VERSION);	\
-		tar -cf - mercury-compiler-$(VERSION) |			\
+		tar --exclude ".git" -cf - mercury-compiler-$(VERSION) | \
 			gzip -9 > mercury-compiler-$(VERSION).tar.gz;	\
 		tar -cf - mercury-extras-$(VERSION) |			\
 			gzip -9 > mercury-extras-$(VERSION).tar.gz;	\



More information about the reviews mailing list