diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-10-26 23:07:45 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-10-26 23:07:45 -0700 |
commit | f4e2a6bcd257bd5cb80ed1318c35e79da9e61b2b (patch) | |
tree | 3274116e53db50ca0e492b4aa2d3c253dd19f6ee | |
parent | 556c5afd23c09d969fda2ff604abc11c98def032 (diff) |
Update when a different build is required
-rwxr-xr-x | scripts/get-ios.sh | 6 | ||||
-rwxr-xr-x | scripts/get-mac.sh | 6 | ||||
-rwxr-xr-x | scripts/include.sh/build-dep.sh | 19 |
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 } |