-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathcldr-identify.sh
More file actions
executable file
·33 lines (29 loc) · 961 Bytes
/
cldr-identify.sh
File metadata and controls
executable file
·33 lines (29 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# Copyright © 1991-2020 Unicode, Inc. All rights reserved. Distributed under
# the Terms of Use in http://www.unicode.org/copyright.html.
#
# Creates JSON data under ./cldr-json in this directory.
. ./cldr-config.sh
if [ -x ./local-config.sh ];
then
echo "Using local-config.sh"
. ./local-config.sh
fi
function explain_repo()
{
# set 'UPSTREAM_CLDR_JSON=upstream' etc. in local-config.sh to rename the remote
UPSTREAM_VAR=$(echo upstream-$1 | tr a-z- A-Z_)
UPSTREAM=${!UPSTREAM_VAR:-origin}
git remote get-url ${UPSTREAM} | sed -E 's/git@github.com:|https:\/\/github.com\/|.git//g'
git describe --tags HEAD
}
echo "* cldr-json info"
if [[ "$INDATA" == "generate" ]]
then
echo "- DATA: " $(cd ${CLDR_DIR}; explain_repo cldr) "(generated)"
else
echo "- DATA: " $(cd ${INDATA}; explain_repo cldr-staging)
fi
echo "- TOOL: " $(cd ${CLDR_DIR}; explain_repo cldr)
echo "- SCRIPT: " $(explain_repo cldr-json)