From: Fabian Wickborn Date: Thu, 20 Aug 2015 08:45:51 +0000 (+0200) Subject: build: Fix bootstrap.bash for official source tarballs X-Git-Tag: go1.6beta1~1208 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1ac84d4300a18954ce8a0e3daa9c1d54573e1552;p=gostls13.git build: Fix bootstrap.bash for official source tarballs At the moment, bootstrap.bash assumes it is called from a git working copy. Hence, it fails to complete when running in an unpacked official source tarball where .git and .gitignore do not exist. This fix adds a test for existence for .git and a -f switch for the removal of .gitignore. Fixes #12223 Change-Id: I7f305b83b38d5115504932bd38dadb7bdeb5d487 Reviewed-on: https://go-review.googlesource.com/13770 Reviewed-by: Dave Cheney Reviewed-by: Andrew Gerrand --- diff --git a/src/bootstrap.bash b/src/bootstrap.bash index 60d6151ccd..1b5ba7c536 100755 --- a/src/bootstrap.bash +++ b/src/bootstrap.bash @@ -35,8 +35,10 @@ cp -R "$src" "$targ" cd "$targ" echo echo "#### Cleaning $targ" -rm .gitignore -git clean -f -d +rm -f .gitignore +if [ -e .git ]; then + git clean -f -d +fi echo echo "#### Building $targ" echo