~aleteoryx/muditaos

6ee6ed17f989f227b98e4e1b9d1504baa94ed962 — Marek Niepieklo 4 years ago a12e6ec
[CP-434] Restore checksums.txt for legacy update

To keep legacy update operational,
it needs checksums.txt in update package.
1 files changed, 14 insertions(+), 7 deletions(-)

M tools/generate_update_image.sh
M tools/generate_update_image.sh => tools/generate_update_image.sh +14 -7
@@ 7,18 7,18 @@
function help() {
cat <<- EOF
	Create Update Image for the SOURCE_TARGET. This script should be run from build directory.
	

	${0} <SOURCE_TARGET> <VERSION> <PLATFORM>
	

	    SOURCE_TARGET    - Name of the target (usually PurePhone or BellHybrid)
	    VERSION          - version number to attach to file name
	    PLATFORM         - RT1051 or Linux
	

    In the current work dir, the script will create update image named from this template:
	<SOURCE_TARGET>-<VERSION>-<PLATFORM>-Update.tar
	
	
	



EOF
}



@@ 46,7 46,7 @@ function checkForDeps() {
    while [[ I -lt ${DEPS_COUNT} ]]; do
        ITEM=${DEPS[${I}]}
        if [[ ! -e "${ITEM}" ]]; then
            echo "Couldn't find dependency: \"${ITEM}\"" 
            echo "Couldn't find dependency: \"${ITEM}\""
            echo exti 2
        fi
        I=$(( I + 1))


@@ 74,6 74,12 @@ function linkInStageing(){
    popd 1> /dev/null
}

function addChecksums() {
    pushd ${STAGEING_DIR} 1> /dev/null
    rhash -u checksums.txt -r .
    popd 1> /dev/null
}

function compress() {
    tar chf ${PACKAGE_FILE} -C ${STAGEING_DIR} .
}


@@ 87,6 93,7 @@ setVars "${1}" "${2}" "${3}"
checkForDeps ${DEPS}
cleanStagingDir ${STAGEING_DIR}
linkInStageing
addChecksums
compress