diff options
Diffstat (limited to 'build/generate-licenses.go')
-rw-r--r-- | build/generate-licenses.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/generate-licenses.go b/build/generate-licenses.go index 02b41a229a..9a111bc811 100644 --- a/build/generate-licenses.go +++ b/build/generate-licenses.go @@ -39,6 +39,14 @@ func main() { defer util.Remove(file.Name()) + if err := os.RemoveAll(destination); err != nil { + log.Fatalf("Cannot clean destination folder: %v", err) + } + + if err := os.MkdirAll(destination, 0o755); err != nil { + log.Fatalf("Cannot create destination: %v", err) + } + req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatalf("Failed to download archive. %s", err) |