@Override public void addFileset(final FileSet set) { if (fileSets == null) { fileSets = new ArrayList<>(); } fileSets.add(set); super.addFileset(set); }
private void mkdirAndCopyTo(String destination, Iterable<FileSet> sets) { if (Iterables.size(sets) == 0) { log("no content: " + destination, Project.MSG_DEBUG); return; } if (sshexec(exec("test -d " + destination).render(osFamily)) == 0) {// TODO windows log("already created: " + destination, Project.MSG_VERBOSE); return; } sshexec(exec("{md} " + destination).render(osFamily)); scp.init(); String scpDestination = getScpDir(destination); log("staging: " + scpDestination, Project.MSG_VERBOSE); for (FileSet set : sets) scp.addFileset(set); scp.setTodir(scpDestination); scp.execute(); }