Project

General

Profile

« Previous | Next » 

Revision deb322cb

Added by Marc Dequènes over 15 years ago

  • ID deb322cb65a210f875d315f9febe7b5522b8af82

[evol] added option for recursive items deletion

View differences:

bin/shadowwalker
self.usages_params = [
"<object> <item>"
]
self.options = CmdParse::OptionParserWrapper.new do |opt|
opt.on( '-r', '--recursive', 'Delete object and all children recursively.' ) { $program_options[:recursive_delete] = true }
end
end
def execute (args)
......
exit 2
end
item.delete
if $program_options[:recursive_delete]
item.class.delete_all(nil, :scope => :sub, :base => item.dn)
else
item.delete
end
puts "Deletion done."
end

Also available in: Unified diff