-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
816 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# copied from $GOROOT/lib/time/update.bash | ||
|
||
CODE=2020a | ||
DATA=2020a | ||
|
||
set -e | ||
WORK="$(pwd)/work" | ||
rm -rf work | ||
mkdir work | ||
cd ./work | ||
trap 'rm -r $WORK' 0 | ||
curl -sSLO https://www.iana.org/time-zones/repository/releases/tzcode$CODE.tar.gz | ||
curl -sSLO https://www.iana.org/time-zones/repository/releases/tzdata$DATA.tar.gz | ||
tar xzf tzdata$DATA.tar.gz | ||
tar xzf tzcode$CODE.tar.gz | ||
make --silent tzdata.zi | ||
{ | ||
cat << "EOF" | ||
// Code xx generated by getzones.bash. DO NOT EDIT. | ||
package main | ||
var zoneNames = map[string]string{ | ||
EOF | ||
awk ' | ||
/^Z/ { | ||
printf("\t\"%s\": \"\",\n", $2) | ||
} | ||
/^L/ { | ||
printf("\t\"%s\": \"%s\",\n", $3, $2) | ||
}' tzdata.zi | ||
echo '}' | ||
} | gofmt > ../zonenames.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.