6501543: Username can have non-alphanumeric characters
authorohair
Mon, 31 Mar 2008 17:20:48 -0700
changeset 307 18015b31ef73
parent 306 d0cc9302b27e
child 308 33a1639d64a5
6501543: Username can have non-alphanumeric characters Summary: User version string issues, including a L10n issue with month names. Reviewed-by: tbell
jdk/make/common/shared/Defs.gmk
--- a/jdk/make/common/shared/Defs.gmk	Mon Mar 31 17:19:06 2008 -0700
+++ b/jdk/make/common/shared/Defs.gmk	Mon Mar 31 17:20:48 2008 -0700
@@ -265,7 +265,9 @@
   FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
 else
   BUILD_NUMBER = b00
-  USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
+  BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
+  CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
+  USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
   FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
 endif