mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <dave@cheney.net> Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
e92d0d82e0
commit
1ac84d4300
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue