[PATCH v2 1/3] update-unicode.sh: automatically download newer definition files
- From
Beat Bolli <dev+git@drbeat.li>
- Date
- Dec 3, 2016, 10:53 UTC
- Message-ID
- <1480762392-28731-1-git-send-email-dev+git@drbeat.li>
- In-Reply-To
- <1480713995-16157-1-git-send-email-dev+git@drbeat.li>
Checking just for the unicode data files' existence is not sufficient; we should also download them if a newer version exists on the Unicode consortium's servers. Option -N of wget does this nicely for us.
Cc: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Beat Bolli <dev+git@drbeat.li> --- Diff to v1: - reword the commit message - add Thorsten's Cc:
update_unicode.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/update_unicode.sh b/update_unicode.sh index 27af77c..3c84270 100755 --- a/update_unicode.sh +++ b/update_unicode.sh @@ -10,12 +10,8 @@ if ! test -d unicode; then mkdir unicode fi && ( cd unicode && - if ! test -f UnicodeData.txt; then - wget http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt - fi && - if ! test -f EastAsianWidth.txt; then - wget http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt - fi && + wget -N http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt \ + http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt && if ! test -d uniset; then git clone https://github.com/depp/uniset.git fi &&
-- 2.7.2