Install site from given configuration.

@command project:install-config
@aliases pic
512519
public function projectInstallConfig() {
    $this->getInstallTask()
      ->arg('config_installer_sync_configure_form.sync_directory=' . $this->config('settings.config_directories.sync'))
      ->siteInstall('config_installer')
      ->run();
    $this->projectSetupSettings();
  }
79696
function pantheonInstall() {
    $admin_name = $this->projectProperties['admin_name'];
    $install_cmd = 'site-install ' . $this->projectProperties['install_profile'] . ' --account-name=' . $admin_name . ' -y';

    $terminus_site_env = $this->getPantheonSiteEnv();
    $install_cmd = "terminus remote:drush $terminus_site_env -- $install_cmd";
    // Pantheon wants the site in SFTP for installs.
    $this->_exec("terminus connection:set $terminus_site_env sftp");

    // Even in SFTP mode, the settings.php file might have too restrictive
    // permissions. We use SFTP to chmod the settings file before installing.
    $sftp_command = trim(exec("terminus connection:info --field=sftp_command $terminus_site_env"));
    $sftp_command = str_replace('sftp', 'sftp -b -', $sftp_command);
    // Use webroot to find settings.php assume  webroot is the gitroot if no
    // webroot is specified.
    if (getenv('TS_WEB_ROOT')) {
      $web_root = getenv('TS_WEB_ROOT') . '/';
    }
    else {
      $web_root = '';
    }
    $default_dir = 'code/' . $web_root . 'sites/default';
    // We use 755 instead of 644 so settings.php is executable, and the
    // directory is stat-able (otherwise we can't chmod the php file)
    $sftp_command .= ' << EOF
chmod 755 ' . $default_dir . '
chmod 755 ' . $default_dir . '/settings.php';
    // Note that we don't use $this->_exec on purpose. SFTP command fails
    // with that operation: a fix would be great but this actually works.
    exec($sftp_command);

    // Run the installation.
    $result = $this->taskExec($install_cmd)
      ->run();
    // Put the site back into git mode.
    $this->_exec("terminus connection:set $terminus_site_env git");

    if ($result->wasSuccessful()) {
      $this->say('Install complete');
    }

    return $result;
  }
565758
def cli(ctx, board, scons, project_dir, sayyes):
    """"""

    if scons:
        Project().create_sconstruct(project_dir, sayyes)
    elif board:
        Project().create_ini(board, project_dir, sayyes)
    else:
        click.secho(ctx.get_help())
1156235
def insert(self, context):
	
		
		
		try:
			current_dir = os.getcwd()
			os.chdir(os.path.join(context.profile_dir(), self.__base_dir))
			args = [
				"packer",
				"build",
				self.__template_path
			]
			subprocess.call(args)
		finally:
			shutil.rmtree("output-*", ignore_errors=True)
			os.chdir(current_dir)
297741
def load_config_from_setup(app):
    
    # for now, assume project root is one level up
    root = os.path.join(app.confdir, '..')
    setup_script = os.path.join(root, 'setup.py')
    fields = ['--name', '--version', '--url', '--author']
    dist_info_cmd = [sys.executable, setup_script] + fields
    output = subprocess.check_output(
        dist_info_cmd,
        cwd=root,
        universal_newlines=True,
    )
    outputs = output.strip().split('\n')
    project, version, url, author = outputs
    app.config.project = project
    app.config.version = app.config.release = version
    app.config.package_url = url
    app.config.author = app.config.copyright = author
1371237
public function install()
    {
        // 1. Set options
        $this->setOptions($this->config->options());

        // 2. Activate plugins
        $this->activatePlugins($this->config->plugins());

        // 3. Maybe set the theme (and settings)
        if ($theme = $this->config->theme()) {
            $this->setTheme($theme->name, $theme->mods, $theme->options, $theme->menus, $theme->sidebars);
        }

        // 4. Maybe set the permalink structure
        global $wp_rewrite;
        if ($wp_rewrite && $permalinks = $this->config->permalinks()) {
            $this->setPermalinkStructure($wp_rewrite, $permalinks);
        }

        // 5. Maybe set the timezone
        if ($timezone = $this->config->timezone()) {
            $this->setTimezone($timezone);
        }
    }
651766
def install_req_from_line(
    name,  # type: str
    comes_from=None,  # type: Optional[Union[str, InstallRequirement]]
    use_pep517=None,  # type: Optional[bool]
    isolated=False,  # type: bool
    options=None,  # type: Optional[Dict[str, Any]]
    wheel_cache=None,  # type: Optional[WheelCache]
    constraint=False  # type: bool
):
    # type: (...) -> InstallRequirement
    
    if is_url(name):
        marker_sep = '; '
    else:
        marker_sep = ';'
    if marker_sep in name:
        name, markers_as_string = name.split(marker_sep, 1)
        markers_as_string = markers_as_string.strip()
        if not markers_as_string:
            markers = None
        else:
            markers = Marker(markers_as_string)
    else:
        markers = None
    name = name.strip()
    req_as_string = None
    path = os.path.normpath(os.path.abspath(name))
    link = None
    extras_as_string = None

    if is_url(name):
        link = Link(name)
    else:
        p, extras_as_string = _strip_extras(path)
        looks_like_dir = os.path.isdir(p) and (
            os.path.sep in name or
            (os.path.altsep is not None and os.path.altsep in name) or
            name.startswith('.')
        )
        if looks_like_dir:
            if not is_installable_dir(p):
                raise InstallationError(
                    "Directory %r is not installable. Neither 'setup.py' "
                    "nor 'pyproject.toml' found." % name
                )
            link = Link(path_to_url(p))
        elif is_archive_file(p):
            if not os.path.isfile(p):
                logger.warning(
                    'Requirement %r looks like a filename, but the '
                    'file does not exist',
                    name
                )
            link = Link(path_to_url(p))

    # it's a local file, dir, or url
    if link:
        # Handle relative file URLs
        if link.scheme == 'file' and re.search(r'\.\./', link.url):
            link = Link(
                path_to_url(os.path.normpath(os.path.abspath(link.path))))
        # wheel file
        if link.is_wheel:
            wheel = Wheel(link.filename)  # can raise InvalidWheelFilename
            req_as_string = "%s==%s" % (wheel.name, wheel.version)
        else:
            # set the req to the egg fragment.  when it's not there, this
            # will become an 'unnamed' requirement
            req_as_string = link.egg_fragment

    # a requirement specifier
    else:
        req_as_string = name

    if extras_as_string:
        extras = Requirement("placeholder" + extras_as_string.lower()).extras
    else:
        extras = ()
    if req_as_string is not None:
        try:
            req = Requirement(req_as_string)
        except InvalidRequirement:
            if os.path.sep in req_as_string:
                add_msg = "It looks like a path."
                add_msg += deduce_helpful_msg(req_as_string)
            elif ('=' in req_as_string and
                  not any(op in req_as_string for op in operators)):
                add_msg = "= is not a valid operator. Did you mean == ?"
            else:
                add_msg = ""
            raise InstallationError(
                "Invalid requirement: '%s'\n%s" % (req_as_string, add_msg)
            )
    else:
        req = None

    return InstallRequirement(
        req, comes_from, link=link, markers=markers,
        use_pep517=use_pep517, isolated=isolated,
        options=options if options else {},
        wheel_cache=wheel_cache,
        constraint=constraint,
        extras=extras,
    )
561658
def install(args):
    "  "

    # Deactivate virtualenv
    if 'VIRTUAL_ENV' in environ:
        LOGGER.warning('Virtualenv enabled: %s' % environ['VIRTUAL_ENV'])

    # Install from base modules
    if args.module:
        args.src = op.join(settings.MOD_DIR, args.module)
        assert op.exists(args.src), "Not found module: %s" % args.module

    # Fix project name
    args.PROJECT = args.PROJECT.replace('-', '_')

    args.home = op.abspath(args.path)

    # Create engine
    engine = Installer(args)
    args.deploy_dir = engine.target_dir

    # Check dir exists
    assert args.info or args.repeat or args.update or not op.exists(
        engine.target_dir), "Path %s exists. Stop deploy." % args.deploy_dir

    try:
        if args.repeat:
            site = Site(engine.target_dir)
            site.run_install()
            return site

        site = engine.clone_source()
        if not site:
            return True

        engine.build(args.update)
        site.run_install()
        return site

    except (CalledProcessError, AssertionError):
        LOGGER.error("Installation failed")
        LOGGER.error("Fix errors and repeat installation with (-r) or run 'makesite uninstall %s' for cancel." % args.deploy_dir)
        raise
269946
def build(self):
        

        self._cmd_parser.add_argument(
            'install',
            type=str,
            default=None,
            nargs="+",
            help=(""),
        )

        self._cmd_parser.add_argument(
            '-l',
            '--location',
            default=None,
            help=("Specify the installation location. ")
        )

        return super(Cmd, self).build()
727035
def setup(working_dir, interactive=False):
    
    # set up our implementation
    log.debug("Working dir: {}".format(working_dir))
    if not os.path.exists( working_dir ):
        os.makedirs( working_dir, 0700 )

    node_config = load_configuration(working_dir)
    if node_config is None:
        sys.exit(1)

    log.debug("config\n{}".format(json.dumps(node_config, indent=4, sort_keys=True)))
    return node_config
1171552
function setup() {

    // check if config directory is given
    if( _config_path !== -1 ) {

      // get path
      var config_path = path.resolve( process.argv[ _config_path + 1 ] );

      // check if directory exists and is a valid directory
      fs.stat( config_path, function( err, stats ) {
        if( err && err.code === "ENOENT" ) {
          process.stdout.write( "The given directory doesn't exists.\n".red );
        } else if( err ) {

          // unknown error
          process.stdout.write( (err.message + "\n").red );
        } else if( !stats.isDirectory() ) {
          process.stdout.write( "The given config directory is not an actual directory.\n".red );
        } else {
          readConfigDir( config_path );
        }
      } );
      return;
    }

    // ask for config directory
    ask( "Where are your config files? ", function( c_path ) {
        readConfigDir( c_path );
    } );
}
39718
def setup_config(command, filename, section, vars):
    """"""
    confuri = "config:" + filename
    if ":" in section:
        confuri += "#" + section.rsplit(":", 1)[-1]
    conf = appconfig(confuri)

    load_environment(conf.global_conf, conf.local_conf)
1353407
def load_settings(path, type)
      # Load fixture
      base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}"))
      config_fixture = base_path + "#{path}_#{type}.xcconfig"
      config = Xcodeproj::Config.new(config_fixture)
      settings = config.to_hash

      # Filter exclusions
      settings = apply_exclusions(settings, EXCLUDED_KEYS)
      project_defaults_by_config = Xcodeproj::Constants::PROJECT_DEFAULT_BUILD_SETTINGS
      project_defaults = project_defaults_by_config[:all]
      project_defaults.merge(project_defaults_by_config[type]) unless type == :base
      settings = apply_exclusions(settings, project_defaults)

      settings
    end
607361
protected function afterInstall()
    {
        $configSourceFile = __DIR__ . DIRECTORY_SEPARATOR . 'config.example.php';
        $configTargetFile = \Craft::$app->getConfig()->configDir . DIRECTORY_SEPARATOR . $this->handle . '.php';

        if (!file_exists($configTargetFile)) {
            copy($configSourceFile, $configTargetFile);
        }
    }
315734
def insert(self, context):
	
		
		
		if self.__dependency:
			self.__execute(context, "install")
		else:
			self.__execute(context, "package")
363969
def __install_ssh_config(self, config):
        
        if not config.is_affirmative('use_global_ssh', default="no"):
            ssh_config_injection = self._build_ssh_config(config)

            if not os.path.exists(ssh_config_path):

                if self.injections.in_noninjected_file(ssh_config_path, "Host %s" % config.get('host')):
                    if config.is_affirmative('override'):
                        self.injections.inject(ssh_config_path, ssh_config_injection)
                else:
                    self.injections.inject(ssh_config_path, ssh_config_injection)

            else:
                self.injections.inject(ssh_config_path, ssh_config_injection)

            self.injections.commit()
372519
function npmInstall(settings) {
  const message = logger.promise('Running npm install (can take several minutes)');

  const installArgs = {};

  if (settings) {
    if (settings.path) {
      installArgs.cwd = settings.path;
    }

    if (settings.stdio) {
      installArgs.stdio = settings.stdio;
    }
  }

  const npmProcess = spawn('npm', ['install'], installArgs);

  return new Promise((resolve, reject) => {
    npmProcess.on('exit', (code) => {
      if (code !== 0) {
        message.fail();
        reject('npm install failed.');
        return;
      }

      message.succeed();
      resolve();
    });
  });
}