From 0cc8ff53b5355299298efb3b5ca37b6895bffc41 Mon Sep 17 00:00:00 2001 From: Arnaud Renevier Date: Wed, 4 Nov 2015 10:34:57 -0800 Subject: [PATCH] Fixes: shouldForceJHBuild isn't called shouldForceJHBuild is never called in build_desktop.sh Also, bash function have an exit value, but do not return a value that can be used as-is in test condition. So as a fix, instead of checking for the return value, we delete the stamp file inside the method if needed. The method is now named forceJHBuildIfNeeded. Reviewed by: a1.gomes Change-Id: Ib9374e99990fc9dbef16d51158967273ed9ccd30 Signed-off-by: Arnaud Renevier --- tizen_src/build/build_desktop.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tizen_src/build/build_desktop.sh b/tizen_src/build/build_desktop.sh index 45b8fb0..576a2c6 100755 --- a/tizen_src/build/build_desktop.sh +++ b/tizen_src/build/build_desktop.sh @@ -15,18 +15,19 @@ parseHostBuildScriptParams desktop $@ JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" -shouldForceJHBuild() { +forceJHBuildIfNeeded() { if [[ $FORCE_JHBUILD == 1 ]]; then - return 1 + rm -f $JHBUILD_STAMPFILE + return fi # Check if anything in jhbuild is more recent than stamp file. - return $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l) + if [ $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l) != "0" ]; then + rm -f $JHBUILD_STAMPFILE + fi } -if [[ $(shouldForceJHBuild) > 0 ]]; then - rm -f $JHBUILD_STAMPFILE -fi +forceJHBuildIfNeeded JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" if [ "${host_arch}" == "x64" ]; then -- 2.7.4