Author: gjb
Date: Wed Feb 11 22:59:24 2015
New Revision: 278603
URL: https://svnweb.freebsd.org/changeset/base/278603

Log:
  Ensure ORGANIZATION_NAME is quoted when ORGANIZATION
  could contain strings of two or more words.
  
  Reviewed by:  peter
  Reported by:  k...@denninger.net
  PR:           197540
  MFC after:    3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/svn/svn/Makefile

Modified: head/usr.bin/svn/svn/Makefile
==============================================================================
--- head/usr.bin/svn/svn/Makefile       Wed Feb 11 22:55:24 2015        
(r278602)
+++ head/usr.bin/svn/svn/Makefile       Wed Feb 11 22:59:24 2015        
(r278603)
@@ -54,8 +54,13 @@ DPSRCS+=     freebsd-organization.h
 CLEANFILES+=   freebsd-organization.h
 CFLAGS+=       -I. -DHAS_ORGANIZATION_NAME
 freebsd-organization.h:
-       @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \
+       @echo '#define ORGANIZATION_NAME        ${ORGANIZATION}' \
            > freebsd-organization.h
+       @# Remove quotes from ORGANIZATION_NAME if they exist.
+       @sed -i '' -e 's,",,g' freebsd-organization.h
+       @# Quote ORGANIZATION_NAME, in case it is two or more words.
+       @sed -i '' -E 's,       ,       ",' freebsd-organization.h
+       @sed -i '' -E 's,$$,",' freebsd-organization.h
 .endif
 
 svnlite.1: svn.1
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to