File distfiles = new File(mountDir, "/usr/portage/distfiles");
File packages = new File(mountDir, "/usr/portage/packages");
List<File> dirs = ImmutableList.of(distfiles, packages);
for (File dir : dirs) {
Scp scp = WaySSH.scp()
.file(dir)
.toHost(options.server)
.at("/var/www/localhost/htdocs/kdo/os/" + options.version)
.send();
if (!scp.success()) {
List<Exception> exs = scp.getExceptions();
for (Exception ex : exs) {
ex.printStackTrace();
}
}
}