Skip to content

Commit b79e28e

Browse files
bbolligitster
authored andcommitted
update_unicode.sh: remove an unnecessary subshell level
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f3eb549 commit b79e28e

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

contrib/update-unicode/update_unicode.sh

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,31 @@
77
#
88
cd "$(dirname "$0")"
99
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 &&
17+
if ! test -d uniset; then
18+
git clone https://github.com/depp/uniset.git
19+
fi &&
1020
(
11-
if ! test -f UnicodeData.txt; then
12-
wget http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
21+
cd uniset &&
22+
if ! test -x uniset; then
23+
autoreconf -i &&
24+
./configure --enable-warnings=-Werror CFLAGS='-O0 -ggdb'
1325
fi &&
14-
if ! test -f EastAsianWidth.txt; then
15-
wget http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
16-
fi &&
17-
if ! test -d uniset; then
18-
git clone https://github.com/depp/uniset.git
19-
fi &&
20-
(
21-
cd uniset &&
22-
if ! test -x uniset; then
23-
autoreconf -i &&
24-
./configure --enable-warnings=-Werror CFLAGS='-O0 -ggdb'
25-
fi &&
26-
make
27-
) &&
28-
UNICODE_DIR=. && export UNICODE_DIR &&
29-
cat >$UNICODEWIDTH_H <<-EOF
30-
static const struct interval zero_width[] = {
31-
$(uniset/uniset --32 cat:Me,Mn,Cf + U+1160..U+11FF - U+00AD |
32-
grep -v plane)
33-
};
34-
static const struct interval double_width[] = {
35-
$(uniset/uniset --32 eaw:F,W)
36-
};
37-
EOF
38-
)
26+
make
27+
) &&
28+
UNICODE_DIR=. && export UNICODE_DIR &&
29+
cat >$UNICODEWIDTH_H <<-EOF
30+
static const struct interval zero_width[] = {
31+
$(uniset/uniset --32 cat:Me,Mn,Cf + U+1160..U+11FF - U+00AD |
32+
grep -v plane)
33+
};
34+
static const struct interval double_width[] = {
35+
$(uniset/uniset --32 eaw:F,W)
36+
};
37+
EOF

0 commit comments

Comments
 (0)