Sha256: 0c6c906d3c9145ed4d02571f3e6307c863daaa293e0e7c402beb9ee7f576b60f

Contents?: true

Size: 1.47 KB

Versions: 12

Compression:

Stored size: 1.47 KB

Contents

# -*- coding: UTF-8 -*-

require 'build-tool/commands'

module BuildTool; module Commands; module Modules

    #
    # BuildCommand
    #
    class Cleanup < ModuleBasedCommand

        name        "cleanup"
        description "Module related cleanup actions."
        long_description [
            "This commands makes it possible to do some module related cleanups. Take care to not",
            "lose data." ]

        def initialize_options
            @all = true
            options.banner = "Usage: #{self.fullname} [OPTIONS]... [MODULE|GROUP]..."
            options.separator( "" )
            options.separator( "Options" )

            @remove_build_directory = false
            options.on( "--rm-bld", "Remove the build directory." ) {
                @remove_build_directory = true
                }

            @remove_source_directory = false
            options.on( "--rm-src", "Remove the source directory." ) {
                @remove_source_directory = true
                }

            options.on( "--rm-both", "Remove the source and build directory." ) {
                @remove_source_directory = true
                @remove_build_directory = true
                }
            super
        end


        def do_execute_module( mod )
            remove_source_directory( mod, true ) if @remove_source_directory
            remove_build_directory( mod, true )  if @remove_build_directory
        end


    end # class

end; end; end # module BuildTool::Commands::Modules


Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
build-tool-0.6.9 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.8 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.7 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.6 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.5 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.4 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.3 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.2 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.1 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.0 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.0.rc2 lib/build-tool/commands/modules/cleanup.rb
build-tool-0.6.0.rc1 lib/build-tool/commands/modules/cleanup.rb