From 353a5331d520a7299d922b670f6ccee0df8a345e Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 22 Aug 2022 06:33:01 +0200 Subject: Remove deprecated licenses (#20222) --- build/generate-licenses.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'build/generate-licenses.go') 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) -- cgit v1.2.3