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

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


        .actionDescription("Fixing ownerships.");
  }

  @Override
  protected void execute0(BdoInstallOptions options) {
    Directory installVar = options.installVar(dirs);

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


  protected void execute0(BdoInstallOptions options) {
    URL url = options.getDataUrl();
    File file = options.getDataFile(dirs);
    Rio.copy(url, file);

    Directory dataDir = options.getDataDir(dirs);

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

  }

  @Override
  protected Messages configureMessages(Messages messages) {
    BdoInstallOptions options = messages.getOptions();
    Directory installVar = options.installVar(dirs);

    return super.configureMessages(messages)
        .actionName("prepare")
        .actionDescription("Staging files at %s.", installVar.getAbsolutePath());
  }
View Full Code Here

  }

  @Override
  protected void execute0(BdoInstallOptions options) {
    String name = options.name;
    Directory installVar = options.installVar(dirs);

    WayEtc.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

  @Parameter(names = "--server")
  String server = "rio.objectos.com.br";

  public Directory installVar(BdoDirs dirs) {
    String child = String.format("%s-%s", engine, name);
    Directory bdoVar = dirs.bdoVar();
    return bdoVar.dirAt(child);
  }
View Full Code Here

    String name = String.format("http://%s/bdo/%s-%s.tar.bz2", server, engine, version);
    return newUrl(name);
  }

  public File getDataFile(BdoDirs dirs) {
    Directory bdoVar = dirs.bdoVar();
    String name = String.format("%s-%s.tar.bz2", engine, version);
    return bdoVar.fileAt(name);
  }
View Full Code Here

    String name = String.format("%s-%s.tar.bz2", engine, version);
    return bdoVar.fileAt(name);
  }

  public Directory getDataDir(BdoDirs dirs) {
    Directory installVar = installVar(dirs);
    String dir = String.format("var/lib/%s/%s-%s", engine, engine, name);
    return installVar.dirAt(dir);
  }
View Full Code Here

    String dir = String.format("var/lib/%s/%s-%s", engine, engine, name);
    return installVar.dirAt(dir);
  }

  public File getMoveFile(BdoDirs dirs) {
    Directory bdoVar = dirs.bdoVar();
    String child = String.format("%s-%s-move.tar", engine, name);
    return bdoVar.fileAt(child);
  }
View Full Code Here

        .actionDescription("Moving files to destination.");
  }

  @Override
  protected void execute0(BdoInstallOptions options) {
    Directory installVar = options.installVar(dirs);
    File file = options.getMoveFile(dirs);

    Tar.changeTo(installVar)
        .preserve()
        .add(".")
View Full Code Here

        .actionDescription("Fixing modes.");
  }

  @Override
  protected void execute0(BdoInstallOptions options) {
    Directory installVar = options.installVar(dirs);
    String scriptName = options.getScriptName();

    Chmod.at(installVar)
        .file("etc/init.d/" + scriptName).to(755)
        .file("var/lib/mysql").to(770)
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.