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

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


  void execute() {
    String resourcesAt = pojo.getResourcesAt();
    String resourcesList = pojo.getResourcesList();
    String resourcesMap = pojo.getResourcesMap();
    Object resourceContext = pojo.getResourceContext();
    Directory mountDir = pojo.getMountDir();
    List<GentooFetch> fetchList = pojo.getFetchList();

    infoAction("objectos");
    info("Applying objectos configuration.");

    resourcesAt(resourcesAt)
        .addFromListAt(resourcesList)
        .mapFromListAt(resourcesMap)
        .evalWith(resourceContext)
        .only("/etc/portage/make.conf")
        .copyTo(mountDir);

    for (GentooFetch fetch : fetchList) {
      HttpServer distfilesServer = pojo.getDistfilesServer();
      distfilesServer.download(fetch.toString())
          .toDir(mountDir.dirAt("usr/portage/distfiles"));
    }
  }
View Full Code Here


  private final Directory bdoVar;

  @Inject
  public BdoDirs(RioDirs dirs) {
    Directory userVar = dirs.userVar();

    bdoVar = userVar.dirAt("bdo");
  }
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

    super(installer);
  }

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

    infoAction("symlink");
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

  public SaoDirs(RioDirs rioDirs) {
    this.rioDirs = rioDirs;
  }

  public Directory var() {
    Directory userVar = rioDirs.userVar();
    return userVar.dirAt("sao");
  }
View Full Code Here

    super(builder.command);
    this.pojo = builder;
  }

  public void quickpkg() {
    Directory mountDir = pojo.getMountDir();

    infoAction("quickpkg");
    info("Generating binaries.");

    Directory portage = mountDir.dirAt("usr/portage");
    chmod(portage)
        .file("packages").to(755)
        .recursively()
        .exec();
View Full Code Here

        .add("quickpkg \"*/*\"")
        .exec();
  }

  public void distfiles() {
    Directory mountDir = pojo.getMountDir();
    String server = pojo.getServer();

    infoAction("distfiles");
    info("Uploading distfiles to portage mirror.");

    File distfiles = mountDir.fileAt("/usr/portage/distfiles");

    scpFile(distfiles)
        .toHost(server)
        .at("/var/www/localhost/htdocs/gentoo/distfiles")
        .send();
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.