[m-dev.] trivial diff: fix mkdir problem on hg

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 19 14:44:31 AEST 1999


Estimated hours taken: 0.1

library/Mmakefile:
	Fix a bug: it should only do a `mkdir' if the
	directory does not already exist.

Workspace: /d-drive/home/hg/public/test_mercury/test_dirs/hg/mercury
Index: library/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/Mmakefile,v
retrieving revision 1.42
diff -u -r1.42 Mmakefile
--- library/Mmakefile	1999/09/16 08:10:38	1.42
+++ library/Mmakefile	1999/09/19 21:05:16
@@ -267,7 +267,8 @@
 		dir=$${ext}s; \
 		rm -f $(INSTALL_INT_DIR)/Mercury/$$dir; \
 		ln -s .. $(INSTALL_INT_DIR)/Mercury/$$dir || { \
-			mkdir $(INSTALL_INT_DIR)/Mercury/$$dir && \
+			[ -d $(INSTALL_INT_DIR)/Mercury/$$dir ] || \
+				mkdir -p $(INSTALL_INT_DIR)/Mercury/$$dir; \
 			cp $(INSTALL_INT_DIR)/*.$$ext \
 				$(INSTALL_INT_DIR)/Mercury/$$dir; \
 		} || exit 1; \

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list