|
@@ -14,23 +14,6 @@ public class ShellUtil {
|
|
|
public final static String LAS_TO_BIN = "bash /home/ubuntu/bin/PotreeConverter.sh @inPath @outPath ''";
|
|
|
|
|
|
|
|
|
- public static void execDockerCmd(String []cmd){
|
|
|
- log.info("execDockerCmd:{}",cmd);
|
|
|
- Process process;
|
|
|
- try {
|
|
|
- process = Runtime.getRuntime().exec(cmd);
|
|
|
- long startTime = System.currentTimeMillis();
|
|
|
- // 获取命令执行结果, 有两个结果: 正常的输出 和 错误的输出(PS: 子进程的输出就是主进程的输入)
|
|
|
- //处理InputStream的线程
|
|
|
- threadRun(process);
|
|
|
- // 方法阻塞, 等待命令执行完成(成功会返回0)
|
|
|
- process.waitFor();
|
|
|
- log.info("execDockerCmd:{},耗时:{}", cmd,System.currentTimeMillis() -startTime);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("execDockerCmd:{},error:{}",cmd,e);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 执行系统命令, 返回执行结果
|