File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434EOF
3535}
3636
37+ is_in_use () {
38+ [[ -e " $1 /.git/index.lock" || -e " $1 /.hg/store/lock" || -e " $1 /.bzr/checkout/lock" ]]
39+ }
40+
3741# Iterates over Godep file dependencies and sets
3842# the specified version on each of them.
3943set_dependencies () {
@@ -42,16 +46,15 @@ set_dependencies() {
4246 while read package version; do
4347 (
4448 local install_path=" ${GOPATH%%:* } /src/${package%%/ ...} "
45- [[ -e " $install_path /.git/index.lock" ||
46- -e " $install_path /.hg/store/lock" ||
47- -e " $install_path /.bzr/checkout/lock" ]] && wait
49+ is_in_use $install_path && wait
4850
4951 echo " >> Getting package " $package " "
50- go get -u -d " $package "
52+ while true ; do go get -u -d " $package " 2> /dev/null && break ; done
5153
5254 echo " >> Setting $package to version $version "
5355 cd $install_path
54- [ -d .hg ] && hg update -q " $version "
56+
57+ [ -d .hg ] && hg update -q " $version "
5558 [ -d .git ] && git checkout -q " $version "
5659 [ -d .bzr ] && bzr revert -q -r " $version "
5760 [ -d .svn ] && svn update -r " $version "
You can’t perform that action at this time.
0 commit comments