Package br.com.objectos.way.base.io

Examples of br.com.objectos.way.base.io.Directory


  }

  public void packages() {
    String server = pojo.getServer();
    String remotePath = pojo.getRemotePath();
    Directory mountDir = pojo.getMountDir();

    infoAction("packages");
    info("Uploading binaries to portage binhost.");

    ssh(server).connect()
        .execute("mkdir -p %s", remotePath)
        .disconnect();

    File packages = mountDir.fileAt("usr/portage/packages");
    scpFile(packages)
        .toHost(server)
        .at(remotePath)
        .send();
  }
View Full Code Here


        .at(remotePath)
        .send();
  }

  public void stage3() {
    Directory mountDir = pojo.getMountDir();
    File stage3File = pojo.getStage3File();

    infoAction("stage3");
    info("Generating stage3 tarball.");
View Full Code Here

    super(setup);
  }

  @Override
  void execute() {
    Directory mountDir = pojo.getMountDir();
    List<String> mkdirList = from(pojo.getMkdirList())
        .transform(Functions.toStringFunction())
        .toList();

    infoAction("mkdir");
View Full Code Here

    super(setup);
  }

  @Override
  void execute() {
    Directory osVar = pojo.getTempDir();
    String sfdiskName = pojo.getSfdisk();
    String device = pojo.getDevice();

    infoAction("partition");
    info("Partitioning target device.");

    resourcesAt(pojo.getResources())
        .add(sfdiskName)
        .copyTo(osVar);

    Procs.newCommand()
        .add("sh")
        .add("-c")
        .add("sfdisk %s < %s", device, osVar.fileAt(sfdiskName).getAbsolutePath())
        .exec();

    List<GentooFilesystem> fsList = pojo.getFsList();
    for (GentooFilesystem fs : fsList) {
      fs.exec(command);
View Full Code Here

    initChmod(options);
  }

  private void initPrepare(BdoInstallOptions options) {
    String name = options.name;
    Directory installVar = options.installVar(dirs);

    infoAction("prepare");
    info("Staging files at %s.", installVar.getAbsolutePath());

    resourcesAt("/bdo/install")
        .map("etc/conf.d/mysql", "/etc/conf.d/mysql-%s", name)
        .map("etc/init.d/mysql", "/etc/init.d/mysql-%s", name)
        .map("etc/mysql/my.cnf", "/etc/mysql/my-%s.cnf", name)
View Full Code Here

    URL url = options.getDataUrl();
    File file = options.getDataFile(dirs);
    Rio.copy(url, file);

    Directory dataDir = options.getDataDir(dirs);

    untar(file)
        .bunzip2()
        .preserve()
        .toDir(dataDir);
View Full Code Here

  private void initChown(BdoInstallOptions options) {
    infoAction("chown");
    info("Fixing ownerships.");

    Directory installVar = options.installVar(dirs);

    chown(installVar)
        .file("etc").to("root.root").recursively()
        .file("var").to("root.root")
        .file("var/lib").to("root.root")
View Full Code Here

  private void initChmod(BdoInstallOptions options) {
    infoAction("chmod");
    info("Fixing modes.");

    Directory installVar = options.installVar(dirs);
    String scriptName = options.getScriptName();

    chmod(installVar)
        .file("etc/init.d/" + scriptName).to(755)
        .file("var/lib/mysql").to(770)
View Full Code Here

  private void install(BdoInstallOptions options) {
    infoAction("move");
    info("Moving files to destination.");

    Directory installVar = options.installVar(dirs);
    File file = options.getMoveFile(dirs);
    Directory dest = options.getDest();

    tar(installVar)
        .preserve()
        .add(".")
        .toFile(file);
View Full Code Here

    super(installer);
  }

  @Override
  void execute() {
    Directory mountDir = pojo.getMountDir();
    String kernelVersion = pojo.getKernelVersion();

    String script = resourceToPrintf("/gentoo/initramfs/bin/simple.script");

    List<String> _init = ImmutableList.<String> builder()
View Full Code Here

TOP

Related Classes of br.com.objectos.way.base.io.Directory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.