-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupdate-dependencies.sh
executable file
·55 lines (47 loc) · 2.41 KB
/
update-dependencies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
get_hg() {
if [ ! -x hg ]; then
echo "Mercurial not found on the system"
echo "Skipping $2 installation"
return 1
fi
local dest="$HOME/$1"
if [ ! -d "$dest" ]; then
hg clone "$2" "$dest"
elif $(hg --cwd "$dest" branch &> /dev/null); then
hg --cwd "$dest" pull
hg --cwd "$dest" update
fi
}
download() {
if which curl 1>/dev/null 2>&1; then
echo "download: $1 ($2)"
curl --max-time 15 "$1" -sLo "$2"
elif which wget 1>/dev/null 2>&1; then
wget -qO "$1" "$2"
else
echo "Cannot download $2"
return 1
fi
}
get_bin() {
local binfile="$SMILE_PATH/bin/$1"
download "$2" "$binfile" && chmod +x "$binfile"
}
get_hg .hg_prompt https://bitbucket.org/sjl/hg-prompt/
get_bin hub https://raw.githubusercontent.com/github/hub/master/script/build # http://defunkt.io/hub/
get_bin git-publish-branch http://git-wt-commit.rubyforge.org/git-publish-branch
get_bin gbrt https://raw.github.com/benhoskings/dot-files/master/files/bin/gbrt
get_bin git-cwd-info https://raw.github.com/topfunky/zsh-simple/master/bin/git-cwd-info
get_bin git-current-branch https://raw.github.com/topfunky/zsh-simple/master/bin/git-current-branch
get_bin git-churn https://raw.github.com/garybernhardt/dotfiles/master/bin/git-churn
get_bin git-divergence https://raw.github.com/garybernhardt/dotfiles/master/bin/git-divergence
get_bin git-rank-contributors http://git-wt-commit.rubyforge.org/git-rank-contributors
get_bin git-wtf http://git-wt-commit.rubyforge.org/git-wtf
get_bin fresh-chrome https://gist.github.com/stuartsierra/6220797/raw/af23e82e79125c6993a836ae9604e8c69518d265/fresh-chrome.sh
get_bin git-trail http://chneukirchen.org/dotfiles/bin/git-trail
get_bin now https://raw.github.com/apankrat/now.sh/master/now.sh
get_bin run-command-on-git-revisions https://raw.githubusercontent.com/garybernhardt/dotfiles/master/bin/run-command-on-git-revisions
get_bin imgcat https://raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat
get_bin xml2json https://raw.githubusercontent.com/hay/xml2json/master/xml2json.py
get_bin structurer https://raw.githubusercontent.com/kevinlebrun/structurer/master/structurer