8 users_home=`su $user -s /bin/sh -c 'echo ~'`
13 test=`grep "$add_string" "$file" | wc -l`
14 if [ $test -lt 1 ]; then
15 echo "$add_string" >> "$file"
19 filename=temp_golang_binary
21 if [ "$url" = "" ]; then
22 echo 'Need URL of current go package'
26 apt-get -y install wget
27 wget -O $filename $url
28 tar -C /usr/local -xzf $filename
30 ensure_line 'export PATH=$PATH:/usr/local/go/bin' $users_home/.shinit_add
31 ensure_line 'export GOPATH=~/gopath' $users_home/.shinit_add
32 apt-get -y install vim-pathogen
33 rm -rf $users_home/.vim/bundle/vim-go
34 su $user -s 'git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go'
35 ensure_line 'source ~/.vimrc_vimgo' $users_home/.vimrc_add
36 cat << EOF > $users_home/.vimrc_vimgo
37 " vim-go: Make vim-go run.
38 call pathogen#infect()
39 let g:go_disable_autoinstall = 0
41 let g:go_highlight_functions = 1
42 let g:go_highlight_methods = 1
43 let g:go_highlight_structs = 1
44 let g:go_highlight_operators = 1
45 let g:go_highlight_build_constraints = 1
47 chown $user $users_home/.vimrc_vimgo
48 chgrp $user $users_home/.vimrc_vimgo