update_unicode.sh: automatically download newer definition files
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. Reviewed-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Beat Bolli committed
Dec 14, 2016 at 00:31 UTC
fef54f31627542b90f0a2af6c98ebb1e4c309211
1 file changed
+2
-6
contrib/update-unicode/update_unicode.sh
+2
-6
@@ -8,12 +8,8 @@
8
cd "$(dirname "$0")"
9
UNICODEWIDTH_H=$(git rev-parse --show-toplevel)/unicode_width.h
10
11
-if ! test -f UnicodeData.txt; then
12
- wget http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
13
-fi &&
14
-if ! test -f EastAsianWidth.txt; then
15
- wget http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
16
-fi &&
11
+wget -N http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt \
12
+ http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt &&
13
if ! test -d uniset; then
14
git clone https://github.com/depp/uniset.git &&
15
( cd uniset && git checkout 4b186196dd )