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

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


  }

  private void eclipseIni() {
    User user = etcs.read(User.class);

    Directory eclipseInstall = dirs.eclipseInstall();

    WayEtc.resourcesAt("/kdo/eclipse/install")
        .add("eclipse.ini")
        .evalWith(user)
        .copyTo(eclipseInstall);
View Full Code Here


        .evalWith(user)
        .copyTo(eclipseInstall);
  }

  private void desktopShortcut() {
    Directory userHome = dirs.userHome();
    Map<String, Object> ctx;
    ctx = ImmutableMap.<String, Object> of("userHome", userHome.getAbsolutePath());

    Directory gnomeApplications = dirs.gnomeApplications();

    WayEtc.resourcesAt("/kdo/eclipse/install")
        .add("eclipse-4.4.0.desktop")
        .evalWith(ctx)
        .copyTo(gnomeApplications);
View Full Code Here

    super(setup);
  }

  @Override
  void execute() {
    Directory osVar = pojo.getTempDir();
    File stage3File = osVar.fileAt(pojo.getStage3());

    infoAction("unpack");
    info("Upacking to target device.");

    Directory installMountPoint = pojo.getMountDir();

    List<GentooMount> mountList = pojo.getMountList();
    for (GentooMount mount : mountList) {
      mount.mount(command, installMountPoint);
    }
View Full Code Here

    super(installer);
  }

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

    infoAction("mkdir");
View Full Code Here

    super(installer);
  }

  @Override
  void execute() {
    Directory mountDir = pojo.getMountDir();
    List<String> useraddList = from(pojo.getUseraddList())
        .transform(ToCommand.INSTANCE)
        .toList();

    infoAction("useradd");
View Full Code Here

    super(installer);
  }

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

    infoAction("move");
View Full Code Here

    }
  }

  private void download(EtoOsLivecdOptions options) {
    HttpServer server = options.fileServer();
    Directory osVar = dirs.osVar();
    File isoFile = osVar.fileAt("install-amd64-minimal.iso");

    infoAction("download");
    info("Downloading required files.");

    download(server).to(osVar)
View Full Code Here

        .add("portage.tar.bz2")
        .exec();
  }

  private void stage(EtoOsLivecdOptions options) {
    Directory osVar = dirs.osVar();
    File isoFile = osVar.fileAt("install-amd64-minimal.iso");
    Directory isoDir = dirs.isoMountDir();
    Directory livecdDir = dirs.livecdMountDir();

    infoAction("stage");
    info("Staging required files.");

    info();
    info("Unpacking iso file.");

    mount(isoFile.getAbsolutePath())
        .options("-o", "loop")
        .to(isoDir);

    Procs.newCommand()
        .add("unsquashfs")
        .add("-f")
        .add("-d")
        .add(livecdDir.getAbsolutePath())
        .add(isoDir.fileAt("image.squashfs").getAbsolutePath())
        .exec();

    umount(isoDir);

    info();
    info("Unpacking portage snapshot.");

    untar(osVar.fileAt("portage.tar.bz2"))
        .bunzip2()
        .preserve()
        .toDir(livecdDir.dirAt("usr"));
  }
View Full Code Here

        .toDir(livecdDir.dirAt("usr"));
  }

  private void emerge(EtoOsLivecdOptions options) {
    HttpServer server = options.distfilesServer();
    Directory mountDir = dirs.livecdMountDir();
    ChrootMount mount = ChrootMount.at(mountDir).mount();

    infoAction("emerge");
    info("Emerging extra packages.");

    server.download("jdk-6u45-linux-x64.bin")
        .toDir(mountDir.dirAt("usr/portage/distfiles"));

    try {

      Chroot chroot = Chroot.at(mountDir)
          .add("source /etc/profile")
View Full Code Here

  public String sshKeyScriptName() {
    return String.format("/etc/local.d/00-%s-ssh-key.start", getCode());
  }

  public OsDirs dirs(EtoDirs xtoDirs) {
    Directory var = xtoDirs.var(getCode());
    return new OsDirs(var);
  }
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.