Sha256: 0b5d9d1c23a4dae4104d073798d34213f4011e79722f928bf24c528bbdf1cdfe
Contents?: true
Size: 1.13 KB
Versions: 13
Compression:
Stored size: 1.13 KB
Contents
#!/usr/bin/env ruby # # == Synopsis # # Destroys the files for leaves, seasons, and other objects of the Autumn # framework. # # == Usage # # script/destroy <options> <object> <name> # # <object>:: The object type to destroy. Valid types are "leaf" and "season". # <name>:: The name of the object to destroy. For example, you can call # "script/destroy leaf Scorekeeper" to remove a leaf named Scorekeeper. # # == Options # # --help, -h:: Displays this usage information. # --vcs, -c:: Remove any created files or directories from the project's version # control system. (Autodetects CVS and Subversion.) require 'libs/script' opts = GetoptLong.new( [ '--help', '-h', GetoptLong::NO_ARGUMENT ], [ '--vcs', '-c', GetoptLong::NO_ARGUMENT ] ) script = Autumn::Script.new begin opts.each do |opt, arg| case opt when '--help' then RDoc::usage when '--vcs' then script.use_vcs end end rescue GetoptLong::InvalidOption RDoc::usage exit 0 end exit(0) unless script.parse_argv(ARGV) case script.object when 'leaf' then script.call_generator(:unleaf) when 'season' then script.call_generator(:unseason) end
Version data entries
13 entries across 13 versions & 2 rubygems