| @@ -1,30 +1,30 @@ | | | @@ -1,30 +1,30 @@ |
1 | # $NetBSD: tzdata2netbsd,v 1.3 2014/08/31 07:04:07 apb Exp $ | | 1 | # $NetBSD: tzdata2netbsd,v 1.4 2014/10/23 03:42:09 apb Exp $ |
2 | | | 2 | |
3 | # For use by NetBSD developers when updating to new versions of tzdata. | | 3 | # For use by NetBSD developers when updating to new versions of tzdata. |
4 | # | | 4 | # |
5 | # 0. Be in an up-to-date checkout of src/external/public-domain/tz | | 5 | # 0. Be in an up-to-date checkout of src/external/public-domain/tz |
6 | # from NetBSD-current. | | 6 | # from NetBSD-current. |
7 | # 1. Edit OLDVER and NEWVER below. | | 7 | # 1. Edit OLDVER and NEWVER below. |
8 | # 3. Run this script. You will be prompted for confirmation before | | 8 | # 3. Run this script. You will be prompted for confirmation before |
9 | # anything major (such as a cvs operation). | | 9 | # anything major (such as a cvs operation). |
10 | # 4. If something fails, abort the script and fix it. | | 10 | # 4. If something fails, abort the script and fix it. |
11 | # 5. Re-run this script until you are happy. It's designed to | | 11 | # 5. Re-run this script until you are happy. It's designed to |
12 | # be re-run over and over, and later runs will try not to | | 12 | # be re-run over and over, and later runs will try not to |
13 | # redo non-trivial work done by earlier runs. | | 13 | # redo non-trivial work done by earlier runs. |
14 | # | | 14 | # |
15 | | | 15 | |
16 | OLDVER=2014f | | 16 | OLDVER=2014h |
17 | NEWVER=2014g | | 17 | NEWVER=2014i |
18 | | | 18 | |
19 | # Uppercase variants of OLDVER and NEWVER | | 19 | # Uppercase variants of OLDVER and NEWVER |
20 | OLDVER_UC="$( echo "${OLDVER}" | tr '[a-z]' '[A-Z]' )" | | 20 | OLDVER_UC="$( echo "${OLDVER}" | tr '[a-z]' '[A-Z]' )" |
21 | NEWVER_UC="$( echo "${NEWVER}" | tr '[a-z]' '[A-Z]' )" | | 21 | NEWVER_UC="$( echo "${NEWVER}" | tr '[a-z]' '[A-Z]' )" |
22 | | | 22 | |
23 | # Tags for use with version control systems | | 23 | # Tags for use with version control systems |
24 | CVSOLDTAG="TZDATA${OLDVER_UC}" | | 24 | CVSOLDTAG="TZDATA${OLDVER_UC}" |
25 | CVSNEWTAG="TZDATA${NEWVER_UC}" | | 25 | CVSNEWTAG="TZDATA${NEWVER_UC}" |
26 | CVSBRANCHTAG="TZDATA" | | 26 | CVSBRANCHTAG="TZDATA" |
27 | GITHUBTAG="${NEWVER}" | | 27 | GITHUBTAG="${NEWVER}" |
28 | | | 28 | |
29 | # URLs for fetching distribution files, etc. | | 29 | # URLs for fetching distribution files, etc. |
30 | DISTURL="ftp://ftp.iana.org/tz/releases/tzdata${NEWVER}.tar.gz" | | 30 | DISTURL="ftp://ftp.iana.org/tz/releases/tzdata${NEWVER}.tar.gz" |
| @@ -206,27 +206,27 @@ EDIT ME: imports tzdata${NEWVER}. The i | | | @@ -206,27 +206,27 @@ EDIT ME: imports tzdata${NEWVER}. The i |
206 | EDIT ME: generated from ${NEWSFILE}. | | 206 | EDIT ME: generated from ${NEWSFILE}. |
207 | EDIT ME: | | 207 | EDIT ME: |
208 | EOF | | 208 | EOF |
209 | awk -v oldver="${OLDVER}" -v newver="${NEWVER}" \ | | 209 | awk -v oldver="${OLDVER}" -v newver="${NEWVER}" \ |
210 | -v disturl="${DISTURL}" -v newsurl="${NEWSURL}" \ | | 210 | -v disturl="${DISTURL}" -v newsurl="${NEWSURL}" \ |
211 | ' | | 211 | ' |
212 | BEGIN { | | 212 | BEGIN { |
213 | bullet = " * "; | | 213 | bullet = " * "; |
214 | indent = " "; | | 214 | indent = " "; |
215 | blankline = 0; | | 215 | blankline = 0; |
216 | goodsection = 0; | | 216 | goodsection = 0; |
217 | havesentence = 0; | | 217 | havesentence = 0; |
218 | print "Import tzdata"newver" from "disturl; | | 218 | print "Import tzdata"newver" from "disturl; |
219 | print "and NEWS file from "newsurl; | | 219 | #print "and NEWS file from "newsurl; |
220 | } | | 220 | } |
221 | /^Release/ { | | 221 | /^Release/ { |
222 | # "Release <version> - <date>" | | 222 | # "Release <version> - <date>" |
223 | ver = $2; | | 223 | ver = $2; |
224 | date = gensub(".* - ", "", 1, $0); | | 224 | date = gensub(".* - ", "", 1, $0); |
225 | print ""; | | 225 | print ""; |
226 | print "Summary of changes in tzdata"ver \ | | 226 | print "Summary of changes in tzdata"ver \ |
227 | " ("date"):"; | | 227 | " ("date"):"; |
228 | } | | 228 | } |
229 | /^$/ { blankline = 1; havesentence = 0; } | | 229 | /^$/ { blankline = 1; havesentence = 0; } |
230 | /^ Changes affecting/ { goodsection = 0; } | | 230 | /^ Changes affecting/ { goodsection = 0; } |
231 | /^ Changes affecting.*time/ { goodsection = 1; } | | 231 | /^ Changes affecting.*time/ { goodsection = 1; } |
232 | /^ Changes affecting.*data format/ { goodsection = 1; } | | 232 | /^ Changes affecting.*data format/ { goodsection = 1; } |