File tree 1 file changed +29
-1
lines changed
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
// Usage: tools/update-timezone.mjs [--dry]
3
3
// Passing --dry will redirect output to stdout.
4
+ import { execSync , spawnSync } from 'node:child_process' ;
5
+ import { renameSync } from 'node:fs' ;
6
+ const fileNames = [
7
+ 'zoneinfo64.res' ,
8
+ 'windowsZones.res' ,
9
+ 'timezoneTypes.res' ,
10
+ 'metaZones.res' ,
11
+ ] ;
12
+
13
+ execSync ( 'rm -rf icu-data' ) ;
14
+ execSync ( 'git clone https://github.com/unicode-org/icu-data' ) ;
15
+ execSync ( 'bzip2 -d deps/icu-small/source/data/in/icudt70l.dat.bz2' ) ;
16
+ fileNames . forEach ( ( file ) => {
17
+ renameSync ( `icu-data/tzdata/icunew/2022a/44/le/${ file } ` , `deps/icu-small/source/data/in/${ file } ` )
18
+ } )
19
+ fileNames . forEach ( ( file ) => {
20
+ spawnSync (
21
+ `icupkg` , [
22
+ `-a` ,
23
+ file ,
24
+ `icudt70l.dat`
25
+ ] , { cwd :`deps/icu-small/source/data/in/` }
26
+ ) ;
27
+ } ) ;
28
+ execSync ( 'bzip2 -z deps/icu-small/source/data/in/icudt70l.dat' )
29
+ fileNames . forEach ( ( file ) => {
30
+ renameSync ( `deps/icu-small/source/data/in/${ file } ` , `icu-data/tzdata/icunew/2022a/44/le/${ file } ` )
31
+ } )
32
+ execSync ( 'rm -rf icu-data' ) ;
4
33
5
- console . log ( 'Initial Skeleton' ) ;
You can’t perform that action at this time.
0 commit comments