diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-05-17 11:06:49 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-05-17 11:07:01 +0200 |
| commit | d25449f858620793cc4eff0726ee9001eaac1c84 (patch) | |
| tree | 6616b57db6010c1a60fa2203bfeed433542210ae /share | |
| parent | Merge #10405: tests: Correct testcase in script_tests.json for large number O... (diff) | |
| parent | Bugfix: Detect genbuild.sh in repo correctly (diff) | |
| download | discoin-d25449f858620793cc4eff0726ee9001eaac1c84.tar.xz discoin-d25449f858620793cc4eff0726ee9001eaac1c84.zip | |
Merge #7522: Bugfix: Only use git for build info if the repository is actually the right one
ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr)
e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr)
Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
Diffstat (limited to 'share')
| -rwxr-xr-x | share/genbuild.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/share/genbuild.sh b/share/genbuild.sh index eecac4bd0..32ef2a575 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -17,9 +17,13 @@ else exit 1 fi +git_check_in_repo() { + ! { git status --porcelain -uall --ignored "$@" 2>/dev/null || echo '??'; } | grep -q '?' +} + DESC="" SUFFIX="" -if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then +if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo share/genbuild.sh; then # clean 'dirty' status of touched files that haven't been modified git diff >/dev/null 2>/dev/null |