From 1ed07683f85a18aab26371d2a3b83df5a146636c Mon Sep 17 00:00:00 2001 From: Ungureanu Marius Date: Mon, 29 Jun 2015 14:54:44 +0300 Subject: Robustify file check. --- build.libgit2.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.libgit2.sh b/build.libgit2.sh index 42456cc..2816b4f 100755 --- a/build.libgit2.sh +++ b/build.libgit2.sh @@ -30,13 +30,16 @@ function check_newer_binaries { if [ "$OS" == "Darwin" ] then BUILDDIR=mac + PKGPATH="./mac" + LIBEXT="dylib" else BUILDDIR=external/libgit2/build + LIBEXT="so" fi if [[ -d "$BUILDDIR" ]] then - if [[ "$BUILDDIR/libgit2-${SHORTSHA}.*" == "$BUILDDIR/libgit2-${SHORTSHA}." ]] + if [[ -f "$BUILDDIR/libgit2-${SHORTSHA}.${LIBEXT}" ]] then echo "Binaries are the same as in output directory." exit 0 @@ -46,9 +49,6 @@ fi if [ "$OS" == "Darwin" ]; then check_newer_binaries - PKGPATH="./mac" - LIBEXT="dylib" - mkdir -p external/libssh2/build pushd external/libssh2/build -- cgit v1.2.3