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 /scripts/include.sh | |
parent | 556c5afd23c09d969fda2ff604abc11c98def032 (diff) |
Update when a different build is required
Diffstat (limited to 'scripts/include.sh')
-rwxr-xr-x | scripts/include.sh/build-dep.sh | 19 |
1 files changed, 18 insertions, 1 deletions
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 } |