From: Beat Bolli <dev+git@drbeat.li>
To: git@vger.kernel.org
Cc: Beat Bolli <dev+git@drbeat.li>
Subject: [PATCH v2 2/6] update_unicode.sh: remove an unnecessary subshell level
Date: Wed, 14 Dec 2016 00:31:40 +0100 [thread overview]
Message-ID: <1481671904-1143-3-git-send-email-dev+git@drbeat.li> (raw)
In-Reply-To: <1481671904-1143-1-git-send-email-dev+git@drbeat.li>
After the move into contrib/update-unicode, we no longer create the
unicode directory to have a clean working folder. Instead, the directory
of the script is used. This means that the subshell can be removed.
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
contrib/update-unicode/update_unicode.sh | 53 ++++++++++++++++----------------
1 file changed, 26 insertions(+), 27 deletions(-)
diff --git a/contrib/update-unicode/update_unicode.sh b/contrib/update-unicode/update_unicode.sh
index 7b90126..ff664ec 100755
--- a/contrib/update-unicode/update_unicode.sh
+++ b/contrib/update-unicode/update_unicode.sh
@@ -7,32 +7,31 @@
#
cd "$(dirname "$0")"
UNICODEWIDTH_H=$(git rev-parse --show-toplevel)/unicode_width.h
+
+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 &&
+if ! test -d uniset; then
+ git clone https://github.com/depp/uniset.git
+fi &&
(
- if ! test -f UnicodeData.txt; then
- wget http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
+ cd uniset &&
+ if ! test -x uniset; then
+ autoreconf -i &&
+ ./configure --enable-warnings=-Werror CFLAGS='-O0 -ggdb'
fi &&
- if ! test -f EastAsianWidth.txt; then
- wget http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
- fi &&
- if ! test -d uniset; then
- git clone https://github.com/depp/uniset.git
- fi &&
- (
- cd uniset &&
- if ! test -x uniset; then
- autoreconf -i &&
- ./configure --enable-warnings=-Werror CFLAGS='-O0 -ggdb'
- fi &&
- make
- ) &&
- UNICODE_DIR=. && export UNICODE_DIR &&
- cat >$UNICODEWIDTH_H <<-EOF
- static const struct interval zero_width[] = {
- $(uniset/uniset --32 cat:Me,Mn,Cf + U+1160..U+11FF - U+00AD |
- grep -v plane)
- };
- static const struct interval double_width[] = {
- $(uniset/uniset --32 eaw:F,W)
- };
- EOF
-)
+ make
+) &&
+UNICODE_DIR=. && export UNICODE_DIR &&
+cat >$UNICODEWIDTH_H <<-EOF
+static const struct interval zero_width[] = {
+ $(uniset/uniset --32 cat:Me,Mn,Cf + U+1160..U+11FF - U+00AD |
+ grep -v plane)
+};
+static const struct interval double_width[] = {
+ $(uniset/uniset --32 eaw:F,W)
+};
+EOF
--
2.7.2
next prev parent reply other threads:[~2016-12-13 23:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 23:31 [PATCH v2 0/6] unicode_width.h: update the width tables to Unicode 9.0 Beat Bolli
2016-12-13 23:31 ` [PATCH v2 1/6] update_unicode.sh: move it into contrib/update-unicode Beat Bolli
2016-12-13 23:31 ` Beat Bolli [this message]
2016-12-13 23:31 ` [PATCH v2 3/6] update_unicode.sh: pin the uniset repo to a known good commit Beat Bolli
2016-12-15 9:47 ` Dennis Kaarsemaker
2016-12-15 17:50 ` Junio C Hamano
2016-12-13 23:31 ` [PATCH v2 4/6] update-unicode.sh: automatically download newer definition files Beat Bolli
2016-12-14 17:40 ` Beat Bolli
2016-12-14 17:50 ` Junio C Hamano
2016-12-13 23:31 ` [PATCH v2 5/6] update_unicode.sh: remove the plane filter Beat Bolli
2016-12-13 23:31 ` [PATCH v2 6/6] unicode_width.h: update the width tables to Unicode 9.0 Beat Bolli
2016-12-14 1:14 ` [PATCH v2 0/6] " Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481671904-1143-3-git-send-email-dev+git@drbeat.li \
--to=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).