home
·
contact
·
privacy
projects
/
config
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix plomlombot setup.
[config]
/
setup_go.sh
diff --git
a/setup_go.sh
b/setup_go.sh
index 4d255f8f58cfef0fa5bc93b87df3cbaefdde1f19..fc2f34490c43c13bb692f8b3e4333f2dfd43fe01 100755
(executable)
--- a/
setup_go.sh
+++ b/
setup_go.sh
@@
-3,6
+3,8
@@
set -e
set -x
set -e
set -x
+url=$1
+
ensure_line() {
add_string="$1"
file="$2"
ensure_line() {
add_string="$1"
file="$2"
@@
-14,13
+16,13
@@
ensure_line() {
filename=temp_golang_binary
filename=temp_golang_binary
-if [ "$
1
" = "" ]; then
+if [ "$
url
" = "" ]; then
echo 'Need URL of current go package'
exit 1
fi
sudo rm -rf /usr/local/go
sudo apt-get -y install wget
echo 'Need URL of current go package'
exit 1
fi
sudo rm -rf /usr/local/go
sudo apt-get -y install wget
-wget -O $filename $
1
+wget -O $filename $
url
sudo tar -C /usr/local -xzf $filename
rm $filename
ensure_line 'export PATH=$PATH:/usr/local/go/bin' ~/.shinit_add
sudo tar -C /usr/local -xzf $filename
rm $filename
ensure_line 'export PATH=$PATH:/usr/local/go/bin' ~/.shinit_add