Exemple #1
0
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")
Exemple #2
0
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)