lib/cli.rb in inqlude-0.0.3 vs lib/cli.rb in inqlude-0.0.4

- old
+ new

@@ -77,16 +77,16 @@ view.create options[:output_dir] end desc "show <library_name>", "Show library details" def show name - get_involved "Add command for showing library details" + Upstream.get_involved "Add command for showing library details", 1 end desc "verify", "Verify manifests" def verify - get_involved "Add command for verifying manifests" + Upstream.get_involved "Add command for verifying manifests", 2 end desc "create", "Create manifest" method_option :dry_run, :type => :boolean, :desc => "Dry run. Don't write files." @@ -109,22 +109,31 @@ m.process_all_rpms end desc "get_involved", "Information about how to get involved" def get_involved - puts - puts "If you would like to help with development of the Inqlude tool," - puts "have a look at the git repository, in particular the list of open" - puts "issues: https://github.com/cornelius/inqlude/issues" - puts - puts "If you would like to contribute information about a Qt based" - puts "library, have a look at the git repository containing the library" - puts "meta data: https://github.com/cornelius/inqlude_data" - puts - puts "Your help is appreciated." - puts - puts "If you have questions or comments, please let me know:" - puts "Cornelius Schumacher <schumacher@kde.org>" - puts + Upstream.print_info + end + + desc "uninstall", "Uninstall library" + def uninstall name + handler = ManifestHandler.new @@settings + manifest = handler.manifest name + if !manifest + STDERR.puts "Manifest for '#{name}' not found" + else + @@distro.uninstall manifest + end + end + + desc "install", "Install library" + def install name + handler = ManifestHandler.new @@settings + manifest = handler.manifest name + if !manifest + STDERR.puts "Manifest for '#{name}' not found" + else + @@distro.install manifest + end end end