bug 处理
This commit is contained in:
parent
b9af177ad6
commit
c2d4f1b107
@ -29,7 +29,7 @@ public class ShellUtil {
|
||||
// 设置工作目录为/data
|
||||
File workingDir = new File("/data");
|
||||
if (!workingDir.exists()) {
|
||||
System.err.println("Warning: /data directory does not exist");
|
||||
System.out.println("Warning: /data directory does not exist");
|
||||
// 如果/data目录不存在,则使用当前目录
|
||||
workingDir = new File(".");
|
||||
}
|
||||
@ -67,9 +67,9 @@ public class ShellUtil {
|
||||
// 处理错误输出
|
||||
BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
|
||||
String errorLine;
|
||||
System.err.println("=== Error Output ===");
|
||||
System.out.println("=== Error Output ===");
|
||||
while ((errorLine = errorReader.readLine()) != null) {
|
||||
System.err.println(errorLine);
|
||||
System.out.println("ErrorInfo:"+errorLine);
|
||||
}
|
||||
|
||||
// 等待命令执行完成
|
||||
@ -78,7 +78,7 @@ public class ShellUtil {
|
||||
|
||||
// 如果命令执行失败,可以选择停止执行后续命令
|
||||
if (exitCode != 0) {
|
||||
System.err.println("Command failed, stopping script execution");
|
||||
System.out.println("Command failed, stopping script execution");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -181,14 +181,14 @@ public class ShellUtil {
|
||||
String line2;
|
||||
while ((line2 = reader.readLine()) != null) {
|
||||
// 打印日志
|
||||
System.err.println("log:"+line2);
|
||||
System.out.println("ErrorInfo:"+line2);
|
||||
}
|
||||
// 获取错误流
|
||||
BufferedReader errorReader = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
|
||||
String line;
|
||||
while ((line = errorReader.readLine()) != null) {
|
||||
// 打印错误流的内容
|
||||
System.err.println("error:"+line);
|
||||
System.out.println("ErrorInfo:"+line);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
echo "Hello, output-001!"
|
||||
cd /data
|
||||
|
||||
cp -r ${playground}/BIDS_output/sub-001/dwi ${outPath}/
|
||||
|
||||
sh /data/DTI_process.sh ${outPath}/dwi/
|
||||
|
@ -1,7 +1,4 @@
|
||||
#!/bin/bash
|
||||
cd /data
|
||||
|
||||
cd /data
|
||||
echo "执行源文件处理脚本"
|
||||
python dealTest_dti.py --base_dir ${playground} --output_dir ${playground}/BIDS_output --json_dir ${playground}/BIDS_output/sub-001/func/
|
||||
rm -rf ./${playground}/BIDS_output/config.json
|
||||
|
Loading…
Reference in New Issue
Block a user