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 <a.renevier@samsung.com>
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