.homedir-setup.rb

changeset 240
18f78b36f003
parent 213
859dd4b440d8
child 241
599f0e8cfb32
equal deleted inserted replaced
239:a99db33c13e1 240:18f78b36f003
51 end 51 end
52 end 52 end
53 53
54 54
55 def setup 55 def setup
56
57 # oh-my-zsh {{{ 56 # oh-my-zsh {{{
58 # some custom zsh files are already in .oh-my-zsh.cust 57 # some custom zsh files are already in .oh-my-zsh.cust
59
60 if Dir.exists?('.oh-my-zsh/.git') 58 if Dir.exists?('.oh-my-zsh/.git')
61 puts "oh-my-zsh already installed" 59 puts "oh-my-zsh already installed"
62 else 60 else
63 puts "Installing oh-my-zsh..." 61 puts "Installing oh-my-zsh..."
64 62
65 do_cmds \ 63 do_cmds \
66 'git clone git://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh' 64 'git clone git://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh'
67
68 end 65 end
69
70 # }}} 66 # }}}
71 67
72
73 # plenv {{{ 68 # plenv {{{
74
75 if Dir.exists?('.plenv') 69 if Dir.exists?('.plenv')
76 puts "plenv already installed" 70 puts "plenv already installed"
77 else 71 else
78 puts "Installing plenv..." 72 puts "Installing plenv..."
79 73
80 do_cmds \ 74 do_cmds \
81 'git clone git://github.com/tokuhirom/plenv.git .plenv', 75 'git clone git://github.com/tokuhirom/plenv.git .plenv',
82 'git clone git://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/' 76 'git clone git://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/'
83
84 end 77 end
85
86 # }}} 78 # }}}
87
88 79
89 # rbenv {{{ 80 # rbenv {{{
90 if Dir.exists?('.rbenv') 81 if Dir.exists?('.rbenv')
91 puts "rbenv already installed" 82 puts "rbenv already installed"
92 else 83 else
93 puts "Installing rbenv..." 84 puts "Installing rbenv..."
94 85
95 do_cmds \ 86 do_cmds \
96 'git clone https://github.com/sstephenson/rbenv.git .rbenv', 87 'git clone https://github.com/sstephenson/rbenv.git .rbenv',
97 'git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build/' 88 'git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build/'
98
99 end 89 end
100 # }}} 90 # }}}
101
102 91
103 # ndenv {{{ 92 # ndenv {{{
104 if Dir.exists?('.ndenv') 93 if Dir.exists?('.ndenv')
105 puts "ndenv already installed" 94 puts "ndenv already installed"
106 else 95 else
107 puts "Installing ndenv..." 96 puts "Installing ndenv..."
108 97
109 do_cmds \ 98 do_cmds \
110 'git clone https://github.com/riywo/ndenv.git .ndenv', 99 'git clone https://github.com/riywo/ndenv.git .ndenv',
111 'git clone https://github.com/riywo/node-build.git .ndenv/plugins/node-build' 100 'git clone https://github.com/riywo/node-build.git .ndenv/plugins/node-build'
112
113 end 101 end
114 # }}} 102 # }}}
115
116
117 end 103 end
118 104
119 def update 105 def update
120
121 [ 106 [
122 '.oh-my-zsh', 107 '.oh-my-zsh',
123 '.plenv', 108 '.plenv',
124 '.plenv/plugins/perl-build', 109 '.plenv/plugins/perl-build',
125 '.rbenv', 110 '.rbenv',
128 '.ndenv/plugins/node-build', 113 '.ndenv/plugins/node-build',
129 ].each do |dir| 114 ].each do |dir|
130 do_cmds \ 115 do_cmds \
131 "cd ~/#{dir} && git pull origin master" 116 "cd ~/#{dir} && git pull origin master"
132 end 117 end
133
134
135 end 118 end
136 119
137 main 120 main
138 121

mercurial