Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
Robustify file check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Therzok committed Jun 29, 2015
1 parent 81903b0 commit 1ed0768
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.libgit2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 1ed0768

Please sign in to comment.