bin/larva in larva-0.6.2 vs bin/larva in larva-0.6.3

- old
+ new

@@ -22,15 +22,16 @@ # Copy template directory FileUtils.cp_r(@template_dir, @daemon_dir) rename_directories rename_files rename_file_contents + git_it_up + $stdout.puts "Daemon '#{@daemon_name}' created succesfully :)" end private - def rename_directories Dir.glob("#{@daemon_dir}/**/*/").each do |original_path| new_path = original_path.gsub('larva_spawn', @daemon_name) next if new_path == original_path @@ -56,9 +57,13 @@ contents.gsub!("larva_spawn", @daemon_name) contents.gsub!("LARVA_SPAWN", @daemon_name.upcase) file.write(contents) end end + end + + def git_it_up + `cd #{@daemon_name} && git init && git add . && git commit -am "Create basic daemon" && cd ..` end end def error_exit(error) $stderr.puts "!! Error: #{error}"