Tue, 01 Jul 2014 22:11:03 -0400
Try to make setup easier, unify shell environments
94
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
1 | #!/usr/bin/env ruby |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
2 | # vim: et sts=2 sw=2 fdm=marker |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
3 | # encoding: UTF-8 |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
4 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
5 | # we don't yet have rbenv so keep safe for ruby 1.8 |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
6 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
7 | if `which git` == '' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
8 | puts "please install git" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
9 | exit 1 |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
10 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
11 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
12 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
13 | # util {{{ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
14 | # just checks and bails after each call |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
15 | def do_cmds (*cmds) |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
16 | cmds.each do |cmd| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
17 | puts "$ #{cmd}" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
18 | system( cmd ) or exit $? |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
19 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
20 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
21 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
22 | #checks for the first line and if it's not there, appends the whole set |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
23 | def add_if_missing (fn, lines) |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
24 | match = lines.lines.first.chomp |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
25 | add = false |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
26 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
27 | if File.exists?(fn) |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
28 | File.open(fn) do |file| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
29 | if file.each_line.none? { |line| line.chomp == match } |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
30 | add = true |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
31 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
32 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
33 | else |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
34 | add = true |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
35 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
36 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
37 | if add == true |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
38 | File.open(fn, 'a') do |append| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
39 | append << lines |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
40 | append << $/ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
41 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
42 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
43 | puts "Added to #{fn}:" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
44 | puts lines + $/ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
45 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
46 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
47 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
48 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
49 | def replace_line (fn, match, replace) |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
50 | buf = [] |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
51 | changed = false |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
52 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
53 | File.open(fn) do |file| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
54 | file.each_line do |line| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
55 | buf << if line.match(match) |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
56 | changed = true |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
57 | replace |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
58 | else |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
59 | line |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
60 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
61 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
62 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
63 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
64 | if changed |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
65 | File.open( fn + ".tmp~", 'w' ) do |file| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
66 | buf.each do |line| |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
67 | file.puts line |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
68 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
69 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
70 | puts 'changes in #{fn}.tmp~' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
71 | else |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
72 | puts 'no change' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
73 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
74 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
75 | # }}} |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
76 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
77 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
78 | # oh-my-zsh {{{ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
79 | # i have a custom theme and the omz install complains about already |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
80 | # having a directory there. remove, install, then revert my stuff |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
81 | # out of hg |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
82 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
83 | if Dir.exists?('.oh-my-zsh/.git') |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
84 | puts "oh-my-zsh already installed" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
85 | else |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
86 | puts "Installing oh-my-zsh..." |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
87 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
88 | do_cmds \ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
89 | 'rm -r .oh-my-zsh', |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
90 | 'git clone git://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh', |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
91 | 'hg stat -dn0 -I .oh-my-zsh/ | xargs -0 hg revert' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
92 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
93 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
94 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
95 | # }}} |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
96 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
97 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
98 | add_if_missing '.bash_profile', 'export PATH=~/bin:$PATH' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
99 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
100 | add_if_missing '.zshrc', <<END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
101 | typeset -U path |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
102 | path=(~/bin "$path[@]") |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
103 | END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
104 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
105 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
106 | # plenv {{{ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
107 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
108 | if Dir.exists?('.plenv') |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
109 | puts "plenv already installed" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
110 | else |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
111 | puts "Installing plenv..." |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
112 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
113 | do_cmds \ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
114 | 'git clone git://github.com/tokuhirom/plenv.git .plenv', |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
115 | 'git clone git://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
116 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
117 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
118 | add_if_missing '.bash_profile', <<END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
119 | export PATH="$HOME/.plenv/bin:$PATH" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
120 | eval "$(plenv init -)" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
121 | END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
122 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
123 | add_if_missing '.zshrc', <<END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
124 | path=(~/.plenv "$path[@]") |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
125 | eval "$(plenv init - zsh)" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
126 | END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
127 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
128 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
129 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
130 | # }}} |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
131 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
132 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
133 | # rbenv {{{ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
134 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
135 | # git clone https://github.com/sstephenson/rbenv.git ~/.rbenv |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
136 | # git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
137 | # echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
138 | # echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
139 | if Dir.exists?('.rbenv') |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
140 | puts "rbenv already installed" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
141 | else |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
142 | puts "Installing rbenv..." |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
143 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
144 | do_cmds \ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
145 | 'git clone https://github.com/sstephenson/rbenv.git .rbenv', |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
146 | 'git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build/' |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
147 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
148 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
149 | add_if_missing '.bash_profile', <<END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
150 | export PATH="$HOME/.rbenv/bin:$PATH" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
151 | eval "$(rbenv init -)" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
152 | END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
153 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
154 | add_if_missing '.zshrc', <<END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
155 | path=(~/.rbenv "$path[@]") |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
156 | eval "$(rbenv init - zsh)" |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
157 | END |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
158 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
159 | end |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
160 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
161 | # }}} |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
162 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
163 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
164 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
165 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
166 | # vundle {{{ |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
167 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
168 | # }}} |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
169 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
170 | |
51ca19919894
Try to make setup easier, unify shell environments
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
171 |