Skip to content

Commit 47157b5

Browse files
committed
replace header name
1 parent f7bfd1d commit 47157b5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tool/upgrade.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package main
44

55
import (
66
"archive/zip"
7+
"bufio"
78
"bytes"
89
"fmt"
910
"io"
@@ -80,7 +81,18 @@ func main() {
8081
f.Close()
8182
log.Fatal(err)
8283
}
83-
_, err = io.Copy(f, zr)
84+
scanner := bufio.NewScanner(zr)
85+
for scanner.Scan() {
86+
text := scanner.Text()
87+
if text == `#include "sqlite3.h"` {
88+
text = `#include "sqlite3-binding.h"`
89+
}
90+
_, err = fmt.Fprintln(f, text)
91+
if err != nil {
92+
break
93+
}
94+
}
95+
err = scanner.Err()
8496
if err != nil {
8597
zr.Close()
8698
f.Close()

0 commit comments

Comments
 (0)