Commit 1ac84d43 authored by Fabian Wickborn's avatar Fabian Wickborn Committed by Andrew Gerrand

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/13770Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
parent e92d0d82
...@@ -35,8 +35,10 @@ cp -R "$src" "$targ" ...@@ -35,8 +35,10 @@ cp -R "$src" "$targ"
cd "$targ" cd "$targ"
echo echo
echo "#### Cleaning $targ" echo "#### Cleaning $targ"
rm .gitignore rm -f .gitignore
git clean -f -d if [ -e .git ]; then
git clean -f -d
fi
echo echo
echo "#### Building $targ" echo "#### Building $targ"
echo echo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment