2013-08-26 18:51:22 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Downloads dependencies into vendor/ directory
|
|
|
|
if [[ ! -d vendor ]]; then
|
|
|
|
mkdir vendor
|
|
|
|
fi
|
|
|
|
vendor_dir=${PWD}/vendor
|
|
|
|
|
2013-12-19 12:01:55 -05:00
|
|
|
rm_pkg_dir () {
|
2013-08-26 18:51:22 -04:00
|
|
|
PKG=$1
|
|
|
|
REV=$2
|
2013-09-07 20:48:52 -04:00
|
|
|
(
|
|
|
|
set -e
|
|
|
|
cd $vendor_dir
|
2013-09-11 21:38:09 -04:00
|
|
|
if [[ -d src/$PKG ]]; then
|
|
|
|
echo "src/$PKG already exists. Removing."
|
|
|
|
rm -fr src/$PKG
|
2013-09-07 20:48:52 -04:00
|
|
|
fi
|
2013-12-19 12:01:55 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
git_clone () {
|
|
|
|
PKG=$1
|
|
|
|
REV=$2
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
rm_pkg_dir $PKG $REV
|
2013-09-11 21:38:09 -04:00
|
|
|
cd $vendor_dir && git clone http://$PKG src/$PKG
|
|
|
|
cd src/$PKG && git checkout -f $REV && rm -fr .git
|
2013-09-07 20:48:52 -04:00
|
|
|
)
|
2013-08-26 18:51:22 -04:00
|
|
|
}
|
|
|
|
|
2013-12-19 12:01:55 -05:00
|
|
|
hg_clone () {
|
|
|
|
PKG=$1
|
|
|
|
REV=$2
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
rm_pkg_dir $PKG $REV
|
|
|
|
cd $vendor_dir && hg clone http://$PKG src/$PKG
|
|
|
|
cd src/$PKG && hg checkout -r $REV && rm -fr .hg
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2013-10-01 21:47:38 -04:00
|
|
|
git_clone github.com/kr/pty 3b1f6487b
|
2013-08-26 18:51:22 -04:00
|
|
|
|
|
|
|
git_clone github.com/gorilla/context/ 708054d61e5
|
|
|
|
|
|
|
|
git_clone github.com/gorilla/mux/ 9b36453141c
|
|
|
|
|
2013-10-30 23:24:47 -04:00
|
|
|
git_clone github.com/syndtr/gocapability 3454319be2
|
|
|
|
|
2013-12-19 12:01:55 -05:00
|
|
|
hg_clone code.google.com/p/go.net 84a4013f96e0
|
|
|
|
|
|
|
|
hg_clone code.google.com/p/gosqlite 74691fb6f837
|