OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright 2015 The Crashpad Authors. All rights reserved. | 3 # Copyright 2015 The Crashpad Authors. All rights reserved. |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
(...skipping 29 matching lines...) Expand all Loading... |
40 rsync -Ilr --delete --exclude .git "out/doc/${subdir}/html/" \ | 40 rsync -Ilr --delete --exclude .git "out/doc/${subdir}/html/" \ |
41 "${output_subdir}/" | 41 "${output_subdir}/" |
42 done | 42 done |
43 | 43 |
44 # Move doc/index.html to index.html, adjusting relative paths to other files in | 44 # Move doc/index.html to index.html, adjusting relative paths to other files in |
45 # doc. | 45 # doc. |
46 ${sed_ext} -e 's%<a href="([^/]+)\.html">%<a href="doc/\1.html">%g' \ | 46 ${sed_ext} -e 's%<a href="([^/]+)\.html">%<a href="doc/\1.html">%g' \ |
47 < "${output_dir}/doc/index.html" > "${output_dir}/index.html" | 47 < "${output_dir}/doc/index.html" > "${output_dir}/index.html" |
48 rm "${output_dir}/doc/index.html" | 48 rm "${output_dir}/doc/index.html" |
49 | 49 |
| 50 # Ensure a favicon exists at the root since the browser will always request it. |
| 51 cp doc/favicon.ico "${output_dir}/" |
| 52 |
50 # Create man/index.html | 53 # Create man/index.html |
51 cd "${output_dir}/man" | 54 cd "${output_dir}/man" |
52 cat > index.html << __EOF__ | 55 cat > index.html << __EOF__ |
53 <!DOCTYPE html> | 56 <!DOCTYPE html> |
54 <meta charset="utf-8"> | 57 <meta charset="utf-8"> |
55 <title>Crashpad Man Pages</title> | 58 <title>Crashpad Man Pages</title> |
56 <ul> | 59 <ul> |
57 __EOF__ | 60 __EOF__ |
58 | 61 |
59 for html_file in *.html; do | 62 for html_file in *.html; do |
60 if [[ "${html_file}" = "index.html" ]]; then | 63 if [[ "${html_file}" = "index.html" ]]; then |
61 continue | 64 continue |
62 fi | 65 fi |
63 basename=$(${sed_ext} -e 's/\.html$//' <<< "${html_file}") | 66 basename=$(${sed_ext} -e 's/\.html$//' <<< "${html_file}") |
64 cat >> index.html << __EOF__ | 67 cat >> index.html << __EOF__ |
65 <li> | 68 <li> |
66 <a href="${html_file}">${basename}</a> | 69 <a href="${html_file}">${basename}</a> |
67 </li> | 70 </li> |
68 __EOF__ | 71 __EOF__ |
69 done | 72 done |
70 | 73 |
71 cat >> index.html << __EOF__ | 74 cat >> index.html << __EOF__ |
72 </ul> | 75 </ul> |
73 __EOF__ | 76 __EOF__ |
OLD | NEW |