summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/release/build-release9
1 files changed, 7 insertions, 2 deletions
diff --git a/util/release/build-release b/util/release/build-release
index fd3f63cbc9..464388b198 100755
--- a/util/release/build-release
+++ b/util/release/build-release
@@ -39,10 +39,15 @@ if ! tar --sort=name -cf /dev/null /dev/null 2>/dev/null ; then
fi
if [ ! -d "coreboot-${VERSION_NAME}" ]; then
+ if [ -d .git ]; then
+ GIT_REF_OPTS="--reference . --dissociate"
+ elif [ -d ../../.git ]; then
+ GIT_REF_OPTS="--reference ../.. --dissociate"
+ fi
if [ -n "${USERNAME}" ]; then
- git clone "ssh://${USERNAME}@review.coreboot.org:29418/coreboot.git" "coreboot-${VERSION_NAME}"
+ git clone ${GIT_REF_OPTS} "ssh://${USERNAME}@review.coreboot.org:29418/coreboot.git" "coreboot-${VERSION_NAME}"
else
- git clone https://review.coreboot.org/coreboot.git "coreboot-${VERSION_NAME}"
+ git clone ${GIT_REF_OPTS} https://review.coreboot.org/coreboot.git "coreboot-${VERSION_NAME}"
fi
fi