Created
October 31, 2017 02:42
-
-
Save cuixin/f7d17becd28ba5b4f0e6e5c87f5f9dc5 to your computer and use it in GitHub Desktop.
make minimal go build bootstrap files to build go again.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure that you have compiled the entire go source. | |
# set -x | |
set -e | |
[ ! -d go ] && { echo "There is no go source code here."; exit 1; } | |
[ -d go_bootstrap ] && { echo "You have had go_bootstrap directory."; exit 1;} | |
mkdir -p go_bootstrap/pkg | |
echo "Create go_bootstrap directory successful" | |
cp -r go/{bin,src} go_bootstrap/ | |
cp -r go/pkg/{include,linux_amd64,tool} go_bootstrap/pkg/ | |
echo "Well done, you can compile your go source code now." | |
echo "Run the next code manually:" | |
echo "cd go/src" | |
echo "GOROOT_BOOTSTRAP=$(pwd)/go_bootstrap ./all.bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment