git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 1/3] update-unicode.sh: automatically download newer definition files

From
Beat Bolli <dev+git@drbeat.li>
Date
Dec 3, 2016, 21:00 UTC
Message-ID
<1480798849-13907-1-git-send-email-dev+git@drbeat.li>
In-Reply-To
<835c0328-e812-1cb7-c49e-714ff0e9ffb3@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.

Reviewed-by: Torsten Boegershausen <tboegi@web.de>
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
Diff to v3:
  - change the Cc: into Reviewed-by: on Thorsten's request
  - include the old reroll diffs
Diff to v2:
  - reorder the commits: fix all of update-unicode.sh first, then
    regenerate unicode_width.h only once
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
Previous: Beat BolliNext: Beat Bolli
Message 11 of 18 in “update-unicode.sh: automatically download newer definition files”
  1. 1/2 update-unicode.sh: automatically download newer definition filesBeat Bolli, Dec 2, 2016
  2. 2/2 unicode: update the tables to Unicode 9.0Beat Bolli, Dec 2, 2016
  3. 3/3 unicode_width.h: fix the double_width[] tableBeat Bolli, Dec 3, 2016
  4. 1/3 update-unicode.sh: automatically download newer definition filesBeat Bolli, Dec 3, 2016
  5. 3/3 unicode_width.h: fix the double_width[] tableBeat Bolli, Dec 3, 2016
  6. 1/3 update-unicode.sh: automatically download newer definition filesBeat Bolli, Dec 3, 2016
  7. 2/3 update-unicode.sh: strip the plane offsets from the double_width[] tableBeat Bolli, Dec 3, 2016
  8. 3/3 unicode_width.h: update the tables to Unicode 9.0Beat Bolli, Dec 3, 2016
  9. Torsten B��gershausenDec 3, 2016
  10. Beat BolliDec 3, 2016
  11. 1/3 update-unicode.sh: automatically download newer definition filesBeat Bolli, Dec 3, 2016
  12. 2/3 update-unicode.sh: strip the plane offsets from the double_width[] tableBeat Bolli, Dec 3, 2016
  13. 3/3 unicode_width.h: update the tables to Unicode 9.0Beat Bolli, Dec 3, 2016
  14. Torsten BögershausenDec 4, 2016
  15. Junio C HamanoDec 5, 2016
  16. Beat BolliDec 7, 2016
  17. jbh, Dec 7, 2016
  18. 2/3 unicode_width.h: update the tables to Unicode 9.0Beat Bolli, Dec 3, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.