summaryrefslogtreecommitdiff
path: root/script/build-libgit2.sh
diff options
context:
space:
mode:
Diffstat (limited to 'script/build-libgit2.sh')
-rwxr-xr-xscript/build-libgit2.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/script/build-libgit2.sh b/script/build-libgit2.sh
index dd11314..9df8c3c 100755
--- a/script/build-libgit2.sh
+++ b/script/build-libgit2.sh
@@ -46,6 +46,11 @@ if [ -z "${BUILD_SHARED_LIBS}" ]; then
usage
fi
+if [ -n "${BUILD_LIBGIT_REF}" ]; then
+ git -C "${VENDORED_PATH}" checkout "${BUILD_LIBGIT_REF}"
+ trap "git submodule update --init" EXIT
+fi
+
if [ "${BUILD_SYSTEM}" = "ON" ]; then
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
else