Sha256: 7a224ee5a483c40a06597ec693f5bab5f9e079f69428b28d54d9b5b8df9a9b91
Contents?: true
Size: 1.45 KB
Versions: 3
Compression:
Stored size: 1.45 KB
Contents
#!/usr/bin/env ruby # THIS IS PRETTY SIMPLISTIC AT THE MOMENT. # BUT I JUST WANTED TO GET SOMETHING FUNCITONAL # GOING FOR NOW. WILL FIX IT UP LATER. require 'reap/utilities/shellutils' require 'reap/utilities/fileutils' include Reap::Utilities::ShellUtils include Reap::Utilities::FileUtils def dryrun? ARGV.include?('--dryrun') end def force? ARGV.include?('--force') end #unless Dir['**/*'].empty? # puts Dir.pwd # ans = ask("WARNING: Directory is not empty. Continue?", 'Yn') # case ans.downcase # when 'y', 'yes', '' # puts # else # puts "Reap initialization aborted." # exit 0 # end #end if defined?(::Library) and Library['reap'] datadir = Library['reap'].datadir else datadir = File.join(Config::CONFIG['datadir']) end datadir = File.join(datadir, 'reap') initdir = File.join(datadir, 'init') unless File.exist?(initdir) puts "Error: Can't locate scaffolding -- #{initdir}" exit 0 end puts "Creating Reap initialization files..." puts if File.exist?('.reap') && !force? puts " SKIPPED: .reap" else file = File.join(initdir, '.reap') cp(file, './') puts " CREATED: .reap" end if File.exist?('meta/project.yaml') && !force? puts " SKIPPED: meta/project.yaml" else file = File.join(initdir, 'meta/project.yaml') mkdir_p('meta') cp(file, 'meta/') puts " CREATED: meta/project.yaml" end puts puts "Edit the .reap and meta files to suit your project." puts "You can run reap-scaffold to get a full project scaffolding."
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
reap-9.2.0 | bin/reap-init |
reap-9.2.1 | bin/reap-init |
reap-9.3.0 | bin/reap-init |