Commit 0ab88d8b302614bef7d6d232664fb1d7e1783baa
Merge pull request #74 from j2sol/master
Update boxen-my-config for the proper login env
Showing 1 changed file Inline Diff
script/boxen-my-config
#!/usr/bin/env ruby | 1 | 1 | #!/usr/bin/env ruby | |
# Show the path to your manifest in Boxen, creating if necessary. | 2 | 2 | # Show the path to your manifest in Boxen, creating if necessary. | |
3 | 3 | |||
user = ENV["GH_LOGIN"] | 4 | 4 | user = ENV["BOXEN_GITHUB_LOGIN"] | |
5 | 5 | |||
unless user | 6 | 6 | unless user | |
abort "GH_LOGIN is not defined. Please re-run Boxen." | 7 | 7 | abort "BOXEN_GITHUB_LOGIN is not defined. Please re-run Boxen." | |
end | 8 | 8 | end | |
9 | 9 | |||
editor = ENV["VISUAL"] || ENV["EDITOR"] | 10 | 10 | editor = ENV["VISUAL"] || ENV["EDITOR"] | |
home = ENV["BOXEN_HOME"] + "/repo" | 11 | 11 | home = ENV["BOXEN_HOME"] + "/repo" | |
user = user.downcase | 12 | 12 | user = user.downcase | |
path = "#{home}/modules/people/manifests/#{user}.pp" | 13 | 13 | path = "#{home}/modules/people/manifests/#{user}.pp" | |
14 | 14 | |||
unless File.exist? path | 15 | 15 | unless File.exist? path | |
File.open path, "wb" do |f| | 16 | 16 | File.open path, "wb" do |f| | |
f.puts "class people::#{user} {" | 17 | 17 | f.puts "class people::#{user} {" | |
f.puts "}" | 18 | 18 | f.puts "}" | |
end | 19 | 19 | end | |
end | 20 | 20 | end |