Skip to content

Commit

Permalink
update_unicode.sh: make the output structure visible
Browse files Browse the repository at this point in the history
By using a here document instead of the echo/uniset sequence, the
final structure of the generated file becomes obvious.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Beat Bolli authored and Junio C Hamano committed Dec 22, 2014
1 parent 3a77c20 commit 1679acd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions update_unicode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ fi &&
make
) && {
UNICODE_DIR=. && export UNICODE_DIR &&
echo "static const struct interval zero_width[] = {" &&
uniset/uniset --32 cat:Me,Mn,Cf + U+1160..U+11FF - U+00AD |
grep -v plane &&
echo "};" &&
echo "static const struct interval double_width[] = {" &&
uniset/uniset --32 eaw:F,W &&
echo "};"
cat <<-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
} >$UNICODEWIDTH_H
)

0 comments on commit 1679acd

Please sign in to comment.