|
|
@ -80,6 +80,7 @@ public final class CommandLineInvoker {
|
|
|
|
|
|
|
|
|
|
|
|
})[0];
|
|
|
|
})[0];
|
|
|
|
ZipInputStream input = new ZipInputStream(new FileInputStream(zip));
|
|
|
|
ZipInputStream input = new ZipInputStream(new FileInputStream(zip));
|
|
|
|
|
|
|
|
try {
|
|
|
|
ZipEntry entry;
|
|
|
|
ZipEntry entry;
|
|
|
|
while ((entry = input.getNextEntry()) != null) {
|
|
|
|
while ((entry = input.getNextEntry()) != null) {
|
|
|
|
File file = new File(unpacked, entry.getName());
|
|
|
|
File file = new File(unpacked, entry.getName());
|
|
|
@ -88,11 +89,21 @@ public final class CommandLineInvoker {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
file.getParentFile().mkdirs();
|
|
|
|
file.getParentFile().mkdirs();
|
|
|
|
StreamUtils.copy(input, new FileOutputStream(file));
|
|
|
|
FileOutputStream output = new FileOutputStream(file);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
StreamUtils.copy(input, output);
|
|
|
|
if (entry.getName().endsWith("/bin/spring")) {
|
|
|
|
if (entry.getName().endsWith("/bin/spring")) {
|
|
|
|
file.setExecutable(true);
|
|
|
|
file.setExecutable(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
finally {
|
|
|
|
|
|
|
|
output.close();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
finally {
|
|
|
|
|
|
|
|
input.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
File bin = new File(unpacked.listFiles()[0], "bin");
|
|
|
|
File bin = new File(unpacked.listFiles()[0], "bin");
|
|
|
|