|
|
|
@@ -1042,14 +1042,14 @@ func generateDatasetUnzipCommand(datasetName string) string { |
|
|
|
datasetNameArray := strings.Split(datasetName, ";") |
|
|
|
if len(datasetNameArray) == 1 { //单数据集 |
|
|
|
unZipDatasetCommand = "unzip -q '" + datasetName + "';" |
|
|
|
if strings.HasSuffix(datasetName, ".tar.gz") { |
|
|
|
if strings.HasSuffix(datasetNameArray[0], ".tar.gz") { |
|
|
|
unZipDatasetCommand = "tar --strip-components=1 -zxvf '" + datasetName + "';" |
|
|
|
} |
|
|
|
|
|
|
|
} else { //多数据集 |
|
|
|
for _, datasetNameTemp := range datasetNameArray { |
|
|
|
if strings.HasSuffix(datasetName, ".tar.gz") { |
|
|
|
unZipDatasetCommand = unZipDatasetCommand + "tar -zxvf '" + datasetName + "';" |
|
|
|
if strings.HasSuffix(datasetNameTemp, ".tar.gz") { |
|
|
|
unZipDatasetCommand = unZipDatasetCommand + "tar -zxvf '" + datasetNameTemp + "';" |
|
|
|
} else { |
|
|
|
unZipDatasetCommand = unZipDatasetCommand + "unzip -q '" + datasetNameTemp + "' -d './" + strings.TrimSuffix(datasetNameTemp, ".zip") + "';" |
|
|
|
} |
|
|
|
|