Repository: incubator-impala Updated Branches: refs/heads/master 78e129c92 -> 94fc6a3d0
IMPALA-4096: Allow clean.sh to work from snapshots buildall.sh calls bin/clean.sh, which fails when not in a git directory. This skips the "git clean" steps when not in a git checkout. Todd Lipcon found this when testing a snapshot created using git archive. Change-Id: I12dd9035298151557491009680d66d25c8f58c1d Reviewed-on: http://gerrit.cloudera.org:8080/4336 Tested-by: Internal Jenkins Reviewed-by: Jim Apple <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/f3f72fa0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/f3f72fa0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/f3f72fa0 Branch: refs/heads/master Commit: f3f72fa0e130aa8ac5f6cc57ae3385811c81b6f8 Parents: 78e129c Author: Jim Apple <[email protected]> Authored: Thu Sep 8 08:59:59 2016 -0700 Committer: Jim Apple <[email protected]> Committed: Tue Sep 13 01:44:35 2016 +0000 ---------------------------------------------------------------------- bin/clean.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f3f72fa0/bin/clean.sh ---------------------------------------------------------------------- diff --git a/bin/clean.sh b/bin/clean.sh index 9ac73cf..ec5a658 100755 --- a/bin/clean.sh +++ b/bin/clean.sh @@ -52,13 +52,13 @@ popd # clean be pushd "$IMPALA_HOME/be" # remove everything listed in .gitignore -git clean -Xdfq +git rev-parse 2>/dev/null && git clean -Xdfq popd # clean shell build artifacts pushd "$IMPALA_HOME/shell" # remove everything listed in .gitignore -git clean -Xdfq +git rev-parse 2>/dev/null && git clean -Xdfq popd # Clean stale .pyc, .pyo files and __pycache__ directories. @@ -73,7 +73,9 @@ rm -f "$IMPALA_HOME/be/generated-sources/impala-ir/"* # Cleanup Impala-lzo if [ -e "$IMPALA_LZO" ]; then - pushd "$IMPALA_LZO"; git clean -fdx .; popd + pushd "$IMPALA_LZO" + git rev-parse 2>/dev/null && git clean -fdx + popd fi # When switching to and from toolchain, make sure to remove all CMake generated files
