mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/png: clean up files before generating
This commit is contained in:
parent
20beb9d2b8
commit
ad66c3d90b
@ -59,6 +59,18 @@ func run() error {
|
||||
return err
|
||||
}
|
||||
|
||||
const prefix = "stdlib"
|
||||
|
||||
matches, err := filepath.Glob(prefix + "*.go")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, f := range matches {
|
||||
if err := os.Remove(f); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
for _, f := range files {
|
||||
in, err := os.Open(filepath.Join(dir, f))
|
||||
if err != nil {
|
||||
@ -66,7 +78,7 @@ func run() error {
|
||||
}
|
||||
defer in.Close()
|
||||
|
||||
out, err := os.Create("stdlib" + f)
|
||||
out, err := os.Create(prefix + f)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user