From: Sunmin Lee Date: Thu, 11 Jan 2018 01:22:12 +0000 (+0900) Subject: Apply new version format X-Git-Tag: accepted/tizen/4.0/unified/20180112.071746^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F166572%2F1;p=platform%2Fcore%2Fsystem%2Ftota-ua.git Apply new version format Tizen version used by RW scripts is changed to 4-digit (ex 4.0.0.0). And remove the release number because it will not be used. Change-Id: Icd65ce7c3d9f0535d4d4c3726bbb1eaa78d1bf6d Signed-off-by: Sunmin Lee --- diff --git a/scripts/upgrade-trigger.sh b/scripts/upgrade-trigger.sh index 4dd80fb..72f7944 100755 --- a/scripts/upgrade-trigger.sh +++ b/scripts/upgrade-trigger.sh @@ -55,11 +55,17 @@ flash_pre_image() { } write_version_info() { - OLD_VER=$(cat /etc/config/model-config.xml | grep platform.version \ - | sed -e 's/.*>\(.*\)<.*/\1/') - OLD_REL=$(cat /etc/info.ini | grep Date | sed -e 's/Date=//' -e 's/\_.*//') - echo "OLD_VER=$OLD_VER" > $VERSION_FILE - echo "OLD_REL=$OLD_REL" >> $VERSION_FILE + OLD_VER=$(cat /etc/config/model-config.xml | grep platform.version\" \ + | sed -e 's/.*>\(.*\)<.*/\1/' | head -1) + i=0 + VER=(0 0 0 0) + for ENT in $(echo "$OLD_VER" | tr "." "\n"); do + VER[$i]=$ENT + ((i++)) + done + CVT_VER=${VER[0]}.${VER[1]}.${VER[2]}.${VER[3]} + + echo "OLD_VER=$CVT_VER" > $VERSION_FILE } run_pre_script() {