summaryrefslogtreecommitdiff
path: root/src/make_unicode_fold.sh
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-12-21 13:52:15 +0100
committerJörg Frings-Fürst <debian@jff.email>2018-12-21 13:52:15 +0100
commitb746c25a6800aabc468eee653d8bca8e7810f633 (patch)
treeae87806ec6d6b65e9d3ae1729ccf253e12324e96 /src/make_unicode_fold.sh
parenteb5b295d37e9150e169cc95cbbc39f6ab7b88b2f (diff)
parent8d7d4edacab0298f96a3826819c01b4e8f6cbcfb (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/make_unicode_fold.sh')
-rwxr-xr-xsrc/make_unicode_fold.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/make_unicode_fold.sh b/src/make_unicode_fold.sh
index 45e9566..d5828e1 100755
--- a/src/make_unicode_fold.sh
+++ b/src/make_unicode_fold.sh
@@ -23,6 +23,13 @@ ${GPERF} ${GPERF_OPT} -F,-1 -N onigenc_unicode_fold2_key unicode_fold2_key.gperf
${GPERF} ${GPERF_OPT} -F,-1 -N onigenc_unicode_fold3_key unicode_fold3_key.gperf > ${TMP3}
./gperf_fold_key_conv.py 3 < ${TMP3} > unicode_fold3_key.c
+# remove redundant EOLs before EOF
+perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold_data.c
+perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold1_key.c
+perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold2_key.c
+perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold3_key.c
+perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_unfold_key.c
+
rm -f ${TMP0} ${TMP1} ${TMP2} ${TMP3}
rm -f unicode_unfold_key.gperf unicode_fold1_key.gperf unicode_fold2_key.gperf unicode_fold3_key.gperf