diff --git a/script/centos-build b/script/centos-build index bcbaf79b..adac5055 100755 --- a/script/centos-build +++ b/script/centos-build @@ -12,9 +12,16 @@ if grep -q ' 6' /etc/redhat-release; then fi yum install -y bison git golang make man which -cd /tmp -[ -d git-lfs ] || git clone https://github.com/github/git-lfs -cd git-lfs + +cd $(dirname ${BASH_SOURCE[0]}) +if git rev-parse; then + cd $(git rev-parse --show-toplevel) +else + cd /tmp + [ -d git-lfs ] || git clone https://github.com/github/git-lfs + cd git-lfs +fi + ./script/bootstrap install -D bin/git-lfs /usr/local/bin git lfs init diff --git a/script/debian-build b/script/debian-build index 91bbb734..ae8f6651 100755 --- a/script/debian-build +++ b/script/debian-build @@ -18,9 +18,15 @@ if [[ $go_version < 1.3.1 ]]; then set -u fi -cd /tmp -[ -d git-lfs ] || git clone https://github.com/github/git-lfs -cd git-lfs +cd $(dirname ${BASH_SOURCE[0]}) +if git rev-parse; then + cd $(git rev-parse --show-toplevel) +else + cd /tmp + [ -d git-lfs ] || git clone https://github.com/github/git-lfs + cd git-lfs +fi + ./script/bootstrap install -D bin/git-lfs /usr/local/bin git lfs init