newScript(CUSTOMIZING).
failOnNonZeroResultCode().
body.append(format("mkdir -p %s/lib", getRunDir())).
execute();
int result = machine.installTo(resource, toinstall, getRunDir() + "/" + "lib" + "/");
if (result != 0)
throw new IllegalStateException(format("unable to install classpath entry %s for %s at %s",f,entity,machine));
result = machine.execCommands("unzipping", ImmutableList.of(format("cd %s/lib && unzip %s",getRunDir(),destName)));
} else if (destName.toLowerCase().endsWith(".tgz") || destName.toLowerCase().endsWith(".tar.gz")) {
result = machine.execCommands("untarring gz", ImmutableList.of(format("cd %s/lib && tar xvfz %s",getRunDir(),destName)));
} else if (destName.toLowerCase().endsWith(".tar")) {
result = machine.execCommands("untarring", ImmutableList.of(format("cd %s/lib && tar xvfz %s",getRunDir(),destName)));