Fix documentation generation on Windows.
Previously doc/doc.css was a symlink to util/doc.css, but symlinks don't work well on Windows. Now util/doc.css is copied to the output directory when the documentation is generated. Change-Id: I2c9f4fee4f4307cc3dd70c4be380b4551d5e9ab5 Reviewed-on: https://boringssl-review.googlesource.com/5677 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
6488725e5e
commit
55a3cf4ad5
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ ssl/test/runner/runner
|
||||
*.swp
|
||||
*.swo
|
||||
doc/*.html
|
||||
doc/doc.css
|
||||
|
@ -1 +0,0 @@
|
||||
../util/doc.css
|
13
util/doc.go
13
util/doc.go
@ -605,6 +605,14 @@ func generateIndex(outPath string, config *Config, headerDescriptions map[string
|
||||
return nil
|
||||
}
|
||||
|
||||
func copyFile(outPath string, inFilePath string) error {
|
||||
bytes, err := ioutil.ReadFile(inFilePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(filepath.Join(outPath, filepath.Base(inFilePath)), bytes, 0666)
|
||||
}
|
||||
|
||||
func main() {
|
||||
var (
|
||||
configFlag *string = flag.String("config", "doc.config", "Location of config file")
|
||||
@ -645,4 +653,9 @@ func main() {
|
||||
fmt.Printf("Failed to generate index: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if err := copyFile(*outputDir, "doc.css"); err != nil {
|
||||
fmt.Printf("Failed to copy static file: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user