Previously, script tries to retrieve 'Release' information from
TZ_BUILD_ID by using the 'DATE'(which is from TZ_BUILD_DATE).
But the 'DATE' and date info in TZ_BUILD_ID can be different, so the
'Release' can be invalid.
To solve this issue, script is modified to retrieved 'Release' from
TZ_BUILD_ID alone.
It can get 'Release' information in format:
{date in 8 decimal numbers} + "." + {various length of decimal numbers}
Change-Id: I5130f8881f84f203e06799e2762b547c472ead20
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
DATE=$(echo $TZ_BUILD_DATE | awk -F"[-_.]" '{ print $1 }')
-RELEASE=$(echo $TZ_BUILD_ID | sed "s/.*$DATE/$DATE/")
-RELEASE=$(echo $RELEASE | awk -F"[-_]" '{ print $1 }')
+RELEASE=$(echo $TZ_BUILD_ID | sed -n 's@.*\([0-9]\{8\}\.[0-9]\+\).*@\1@p')
ID=$(echo $TZ_BUILD_ID | sed "s/$DATE.*//")
ID=$(echo $ID | sed "s/[-_.]*$//")