diff options
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 eecac4bd00..32ef2a5755 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 |