[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Patch: robustify find-user in Makefile.common



Here's a quick patch for Makefile.common that avoids empty user being
committed to tobuild [1] when one uses a CVS root like: 

  :ext:@cvs.fedora.redhat.com:/...

[1] https://www.redhat.com/archives/fedora-extras-commits/2005-June/msg01214.html
Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.24
diff -u -r1.24 Makefile.common
--- Makefile.common	17 Jun 2005 22:03:08 -0000	1.24
+++ Makefile.common	19 Jun 2005 13:51:33 -0000
@@ -307,7 +307,7 @@
 	@echo
 
 define find-user
-if [ `cat CVS/Root |grep -c @` -ne 0 ]; then cat CVS/Root  |cut -d @ -f 1 |  sed 's/:.*://' ; else echo $(USER); fi
+if [ `cat CVS/Root |grep -c [^:] ` -ne 0 ]; then cat CVS/Root  |cut -d @ -f 1 |  sed 's/:.*://' ; else echo $(USER); fi
 endef
 USER := $(shell $(find-user))
 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]