Deploy dotfiles using the appropriate method.
760885
def deploy_dotfiles(self, dotfiles):
        """"""
        if self.args.server:
            return self.deploy_remote(dotfiles)
        else:
            return self.deploy_local(dotfiles)
225459
void deploy( Instance instance, PluginInterface plugin, Map<String,byte[]> fileNameToFileContent )
	throws IOException {

		String instancePath = InstanceHelpers.computeInstancePath( instance );
		if( instance.getStatus() != InstanceStatus.NOT_DEPLOYED ) {
			this.logger.fine( instancePath + " cannot be deployed. Prerequisite status: NOT_DEPLOYED (but was " + instance.getStatus() + ")." );

		} else if( instance.getParent() != null
				&& instance.getParent().getStatus() != InstanceStatus.DEPLOYED_STARTED
				&& instance.getParent().getStatus() != InstanceStatus.DEPLOYED_STOPPED
				&& instance.getParent().getStatus() != InstanceStatus.UNRESOLVED
				&& instance.getParent().getStatus() != InstanceStatus.WAITING_FOR_ANCESTOR ) {
			this.logger.fine( instancePath + " cannot be deployed because its parent is not deployed. Parent status: " + instance.getParent().getStatus() + "." );

		} else {
			this.logger.fine( "Deploying instance " + instancePath );

			// User reporting => deploying...
			instance.setStatus( InstanceStatus.DEPLOYING );
			try {
				this.messagingClient.sendMessageToTheDm( new MsgNotifInstanceChanged( this.appName, instance ));

				// Clean up the potential remains of a previous installation
				AgentUtils.deleteInstanceResources( instance );

				// Copy the resources
				AgentUtils.copyInstanceResources( instance, fileNameToFileContent );

				// Initialize the plugin
				plugin.initialize( instance );

				// Invoke the plug-in
				plugin.deploy( instance );
				instance.setStatus( InstanceStatus.DEPLOYED_STOPPED );
				this.messagingClient.sendMessageToTheDm( new MsgNotifInstanceChanged( this.appName, instance ));

			} catch( Exception e ) {
				this.logger.severe( "An error occured while deploying " + instancePath );
				Utils.logException( this.logger, e );

				instance.setStatus( InstanceStatus.NOT_DEPLOYED );
				this.messagingClient.sendMessageToTheDm( new MsgNotifInstanceChanged( this.appName, instance ));
			}
		}
	}
99303
@Validate
    public void start() {
        if (directory.isDirectory()) {
            buildFileIndex();
        }
        if (tracker != null) {
            tracker.open();
        }
        if (deployer != null) {
            deployer.start();
        }
    }
1003592
def add_files(self, files):
        
        for file in files:
            file.copy(project=self.id)
120412
def run(self):
        """"""
        script = path.realpath(__file__)
        self.log.debug('Running from %s with arguments: %s', script, self.args)

        if self.args.source:
            self.source = self.args.source
        else:
            # hardcoding as the parent-parent of the script for now
            self.source = path.dirname(path.dirname(script))
        self.log.debug('Sourcing dotfiles from %s', self.source)

        try:
            if self.args.repo:
                self.clone_repo()

            self.deploy_dotfiles(self.load_dotfiles())

        except:
            self.log.exception('Profile deploy failed')

        finally:
            if self.args.repo:
                self.cleanup_repo()
1061885
def deploy():
    """"""
    _require_root()

    if not confirm("This will apply any available migrations to the database. Has the database been backed up?"):
        abort("Aborted.")
    if not confirm("Are you sure you want to deploy?"):
        abort("Aborted.")

    with lcd(PRODUCTION_DOCUMENT_ROOT):
        with shell_env(PRODUCTION="TRUE"):
            local("git pull")
            with open("requirements.txt", "r") as req_file:
                requirements = req_file.read().strip().split()
                try:
                    pkg_resources.require(requirements)
                except pkg_resources.DistributionNotFound:
                    local("pip install -r requirements.txt")
                except Exception:
                    traceback.format_exc()
                    local("pip install -r requirements.txt")
                else:
                    puts("Python requirements already satisfied.")
            with prefix("source /usr/local/virtualenvs/ion/bin/activate"):
                local("./manage.py collectstatic --noinput", shell="/bin/bash")
                local("./manage.py migrate", shell="/bin/bash")
            restart_production_gunicorn(skip=True)

    puts("Deploy complete.")
158761
def deploy(verbose, app):
    """"""
    # Load psiTurk configuration.
    config = PsiturkConfig()
    config.load_config()

    # Set the mode.
    config.set("Experiment Configuration", "mode", "deploy")
    config.set("Server Parameters", "logfile", "-")

    # Ensure that psiTurk is not in sandbox mode.
    config.set("Shell Parameters", "launch_in_sandbox_mode", "false")

    # Do shared setup.
    deploy_sandbox_shared_setup(verbose=verbose, app=app)
368092
def build(self, *args, **kwargs):
        """"""
        # Create the directories of the work.
        self.indir.makedirs()
        self.outdir.makedirs()
        self.tmpdir.makedirs()

        # Build dirs and files of each task.
        for task in self:
            task.build(*args, **kwargs)

        # Connect signals within the work.
        self.connect_signals()
721433
def setdirs(outfiles):
    """"""
    for k in outfiles:
        fname=outfiles[k]
        dname= os.path.dirname(fname)
        if not os.path.isdir(dname):
            os.mkdir(dname)
852477
public void deploy() throws MojoExecutionException {
    stager.stage();

    DeployConfiguration config =
        configBuilder.buildDeployConfiguration(ImmutableList.of(deployMojo.getStagingDirectory()));

    try {
      deployMojo.getAppEngineFactory().deployment().deploy(config);
    } catch (AppEngineException ex) {
      throw new MojoExecutionException("App Engine application deployment failed", ex);
    }
  }
982035
function () {
            fs.writeFile(solutionFile, solutionFileContents, function(err) {
                if (err) {
                    grunt.fail.warning('Failed to update solution file.');
                }

                done();
            });
        }
66295
function pushFiles() {
      console.info('Pushing files for ' + component);
      git.push('origin', 'master', { args: '', cwd: outputDirectory }, function(error) {
        console.info('Push completed successfully');
        getSHA();
      });
    }
396767
def run(self):
    """"""

    module = self.distribution.ext_modules[0]
    base_dir = os.path.dirname(__file__)

    if base_dir:
      os.chdir(base_dir)

    exclusions = []

    for define in self.define or []:
      module.define_macros.append(define)

    for library in self.libraries or []:
      module.libraries.append(library)

    building_for_windows = self.plat_name in ('win32','win-amd64')
    building_for_osx = 'macosx' in self.plat_name
    building_for_linux = 'linux' in self.plat_name
    building_for_freebsd = 'freebsd' in self.plat_name
    building_for_openbsd = 'openbsd' in self.plat_name # need testing

    if building_for_linux:
      module.define_macros.append(('USE_LINUX_PROC', '1'))
    elif building_for_windows:
      module.define_macros.append(('USE_WINDOWS_PROC', '1'))
      module.define_macros.append(('_CRT_SECURE_NO_WARNINGS', '1'))
      module.libraries.append('kernel32')
      module.libraries.append('advapi32')
      module.libraries.append('user32')
      module.libraries.append('crypt32')
      module.libraries.append('ws2_32')
    elif building_for_osx:
      module.define_macros.append(('USE_MACH_PROC', '1'))
      module.include_dirs.append('/usr/local/opt/openssl/include')
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    elif building_for_freebsd:
      module.define_macros.append(('USE_FREEBSD_PROC', '1'))
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    elif building_for_openbsd:
      module.define_macros.append(('USE_OPENBSD_PROC', '1'))
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    else:
      module.define_macros.append(('USE_NO_PROC', '1'))

    if has_function('memmem'):
      module.define_macros.append(('HAVE_MEMMEM', '1'))
    if has_function('strlcpy'):
      module.define_macros.append(('HAVE_STRLCPY', '1'))
    if has_function('strlcat'):
      module.define_macros.append(('HAVE_STRLCAT', '1'))

    if self.enable_profiling:
      module.define_macros.append(('PROFILING_ENABLED', '1'))

    if self.dynamic_linking:
      module.libraries.append('yara')
    else:
      if not self.define or not ('HASH_MODULE', '1') in self.define:
        if (has_function('MD5_Init', libraries=['crypto']) and
            has_function('SHA256_Init', libraries=['crypto'])):
          module.define_macros.append(('HASH_MODULE', '1'))
          module.define_macros.append(('HAVE_LIBCRYPTO', '1'))
          module.libraries.append('crypto')
        else:
          exclusions.append('yara/libyara/modules/hash.c')

      if self.enable_magic:
        module.define_macros.append(('MAGIC_MODULE', '1'))
        module.libraries.append('magic')
      else:
        exclusions.append('yara/libyara/modules/magic.c')

      if self.enable_cuckoo:
        module.define_macros.append(('CUCKOO_MODULE', '1'))
        module.libraries.append('jansson')
      else:
        exclusions.append('yara/libyara/modules/cuckoo.c')

      if self.enable_dotnet:
        module.define_macros.append(('DOTNET_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/dotnet.c')

      if self.enable_dex:
        module.define_macros.append(('DEX_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/dex.c')

      if self.enable_macho:
        module.define_macros.append(('MACHO_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/macho.c')

      exclusions = [os.path.normpath(x) for x in exclusions]

      for directory, _, files in os.walk('yara/libyara/'):
        for x in files:
          x = os.path.normpath(os.path.join(directory, x))
          if x.endswith('.c') and x not in exclusions:
            module.sources.append(x)

    build_ext.run(self)
1126647
def inject_into_files(scheme_file, files):
    """"""
    for file_ in files:
        rec = Recipient(file_)
        colorscheme = rec.get_colorscheme(scheme_file)
        rec.inject_scheme(colorscheme)
        rec.write()
1014446
def deploy(options)
      # Initialize directory settings
      AgentConfig.root_dir = options[:root_dir]
      AgentConfig.cfg_dir = options[:cfg_dir]
      AgentConfig.pid_dir = options[:pid_dir]

      # Configure agent
      cfg = load_init_cfg
      check_agent(options, cfg)
      cfg = configure(options, cfg)

      # Persist configuration
      persist(options, cfg)

      # Setup agent monitoring
      monitor(options) if options[:monit]
      true
    end
511469
public void deployInitialApplications() {
        initDeployAppAttributeIfIsNull();

        String gitRepoUrl = getConfig(GIT_URL);
        String tarballResourceUrl = getConfig(TARBALL_URL);
        
        if (gitRepoUrl != null) {
            String targetName = inferCorrectAppGitName();
            deployGitResource(gitRepoUrl, targetName);
        } else if (tarballResourceUrl != null) {
            String targetName = inferCorrectAppTarballName();
            deployTarballResource(tarballResourceUrl, targetName);
        }
        
    }
1211672
def mount(dev, mountpoint, flags='', log=None):
    ''''''
    ensureDirectory(mountpoint)
    systemCall('mount %s %s %s' % (flags, dev, mountpoint),
               log=log)