Blame view
script/boxen-my-config
552 Bytes
fdb27960f Update template w... |
1 2 |
#!/usr/bin/env ruby # Show the path to your manifest in Boxen, creating if necessary. |
1e9e96747 Update boxen-my-c... |
3 |
user = ENV["BOXEN_GITHUB_LOGIN"] |
fdb27960f Update template w... |
4 5 |
unless user |
1e9e96747 Update boxen-my-c... |
6 |
abort "BOXEN_GITHUB_LOGIN is not defined. Please re-run Boxen." |
fdb27960f Update template w... |
7 8 9 10 11 12 13 14 15 16 17 18 19 |
end editor = ENV["VISUAL"] || ENV["EDITOR"] home = ENV["BOXEN_HOME"] + "/repo" user = user.downcase path = "#{home}/modules/people/manifests/#{user}.pp" unless File.exist? path File.open path, "wb" do |f| f.puts "class people::#{user} {" f.puts "}" end end |
8229fe238 work with EDITOR ... |
20 |
exec([editor, path].join(' ')) if editor && system("test -t 1") |
fdb27960f Update template w... |
21 22 |
puts path |