aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-26 23:07:45 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-26 23:07:45 -0700
commitf4e2a6bcd257bd5cb80ed1318c35e79da9e61b2b (patch)
tree3274116e53db50ca0e492b4aa2d3c253dd19f6ee
parent556c5afd23c09d969fda2ff604abc11c98def032 (diff)
Update when a different build is required
-rwxr-xr-xscripts/get-ios.sh6
-rwxr-xr-xscripts/get-mac.sh6
-rwxr-xr-xscripts/include.sh/build-dep.sh19
3 files changed, 22 insertions, 9 deletions
diff --git a/scripts/get-ios.sh b/scripts/get-ios.sh
index 1ebc5dbb..32a3eb3e 100755
--- a/scripts/get-ios.sh
+++ b/scripts/get-ios.sh
@@ -8,8 +8,6 @@ popd > /dev/null
deps="ctemplate-ios libetpan-ios tidy-html5-ios uchardet-ios"
for dep in $deps ; do
- if test ! -d "$scriptpath/../Externals/$dep" ; then
- name="$dep"
- get_prebuilt_dep
- fi
+ name="$dep"
+ get_prebuilt_dep
done
diff --git a/scripts/get-mac.sh b/scripts/get-mac.sh
index 9ce0cece..573bfe4a 100755
--- a/scripts/get-mac.sh
+++ b/scripts/get-mac.sh
@@ -8,8 +8,6 @@ popd > /dev/null
deps="ctemplate-osx libetpan-osx uchardet-osx"
for dep in $deps ; do
- if test ! -d "$scriptpath/../Externals/$dep" ; then
- name="$dep"
- get_prebuilt_dep
- fi
+ name="$dep"
+ get_prebuilt_dep
done
diff --git a/scripts/include.sh/build-dep.sh b/scripts/include.sh/build-dep.sh
index 6bc53804..3f9b5c39 100755
--- a/scripts/include.sh/build-dep.sh
+++ b/scripts/include.sh/build-dep.sh
@@ -282,13 +282,26 @@ get_prebuilt_dep()
fi
versions_path="$scriptpath/deps-versions.plist"
+ installed_versions_path="$scriptpath/installed-deps-versions.plist"
if test ! -f "$versions_path" ; then
build_for_external=1 "$scriptpath/build-$name.sh"
return;
fi
-
+
+ installed_version="`defaults read "$installed_versions_path" "$name" 2>/dev/null`"
+ if test ! -d "$scriptpath/../Externals/$name" ; then
+ installed_version=
+ fi
+ if test "x$installed_version" = x ; then
+ installed_version="none"
+ fi
version="`defaults read "$versions_path" "$name" 2>/dev/null`"
+ echo $name, installed: $installed_version, required: $version
+ if test "x$installed_version" = "x$version" ; then
+ return
+ fi
+
BUILD_TIMESTAMP=`date +'%Y%m%d%H%M%S'`
tempbuilddir="$scriptpath/../Externals/workdir/$BUILD_TIMESTAMP"
@@ -301,4 +314,8 @@ get_prebuilt_dep()
mv "$name-$version"/* "$scriptpath/../Externals"
rm -f "$scriptpath/../Externals/git-rev"
rm -rf "$tempbuilddir"
+
+ if test -d "$scriptpath/../Externals/$name" ; then
+ defaults write "$installed_versions_path" "$name" "$version"
+ fi
}