def cmd_list(package_name, category=None): bundle = LibBundle() bundle.load(config.global_config().current_bundle()) files = bundle.list_files(package_name, category) for n in files: print(n)
def cmd_info(): bundle = LibBundle() bundle.load(config.global_config().current_bundle()) print("Bundle: " + bundle.path) print("Toolchain: " + bundle.toolchain) print("Architecture: " + bundle.arch) print("\nInstalled:") for info in sorted(bundle.list_installed()): print("{0:<15}{1:<10}".format(info[0], info[1]))
def cmd_install(formula_spec, options): bundle = LibBundle() bundle.load(config.global_config().current_bundle()) builder = FormulaBuilder(bundle) if options.interactive: def _start_shell(): print("Type 'exit' to continue with the installation, 'exit 1' to abort") try: system.shell() except exceptions.CalledProcessError: raise exceptions.AbortOperation builder.add_hook(builder.hooks.pre_build, _start_shell) try: builder.install(formula_spec, options) except exceptions.AbortOperation: print("Installation Aborted")
def cmd_uninstall(package_name, keep_dependent=False): bundle = LibBundle() bundle.load(config.global_config().current_bundle()) builder = FormulaBuilder(bundle) builder.uninstall(package_name, keep_dependent)