This commit is contained in:
nuknal
2024-10-11 11:25:16 +08:00
parent 839a8648f5
commit 2b8d4f933d
3 changed files with 5 additions and 3 deletions

View File

@@ -9,3 +9,6 @@ clean:
linux: linux:
GOOS=linux GOARCH=amd64 go build -o bin/sjy01-preprocessing -ldflags=${COMPILE_LDFLAGS} *.go GOOS=linux GOARCH=amd64 go build -o bin/sjy01-preprocessing -ldflags=${COMPILE_LDFLAGS} *.go
release:
docker run --rm -v .:/src -v /Users/lan/workspace/sjy01/build/go:/build/go nuknal/gdal38-cv49-builder sh -c "cd /src && make linux"

View File

@@ -33,6 +33,7 @@ var extractCmd = &cobra.Command{
log.Println("satellite:", params.Satellite) log.Println("satellite:", params.Satellite)
e := extract.NewExtractor(params) e := extract.NewExtractor(params)
defer e.Cleanup()
aos, err := e.ExtractAosData() aos, err := e.ExtractAosData()
if err != nil { if err != nil {
panic(err) panic(err)
@@ -55,8 +56,6 @@ var extractCmd = &cobra.Command{
panic(err) panic(err)
} }
e.Cleanup()
return return
} }

View File

@@ -21,7 +21,7 @@ func NewExtractor(params *Params) *Extractor {
if err := os.MkdirAll(params.TempPath, 0755); err != nil { if err := os.MkdirAll(params.TempPath, 0755); err != nil {
panic(err) panic(err)
} }
if err := os.MkdirAll(filepath.Base(params.LogFile), 0755); err != nil { if err := os.MkdirAll(filepath.Dir(params.LogFile), 0755); err != nil {
panic(err) panic(err)
} }
return &Extractor{params: params, Clean: true, report: &Report{SegmentDirRoot: params.OutputPath}} return &Extractor{params: params, Clean: true, report: &Report{SegmentDirRoot: params.OutputPath}}