summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-09-12 10:24:05 +0200
committerDaiki Ueno <ueno@gnu.org>2016-09-12 10:28:26 +0200
commite537d35f0804b11b205515febc1102a1ac95effa (patch)
treeb02bd81c1cd11c46d8b5f252338fbdfe4373c29a
parent5f46af6783b2a5df68a623ce15b01273dc29c74f (diff)
downloadlibunistring-e537d35f0804b11b205515febc1102a1ac95effa.tar.gz
maint: Make gen-uninames script self-contained
Copy necessary UCD files for the tests.
-rwxr-xr-xAdmin/gen-uni-tables4
-rwxr-xr-xAdmin/gen-uninames15
2 files changed, 16 insertions, 3 deletions
diff --git a/Admin/gen-uni-tables b/Admin/gen-uni-tables
index 21d05a9..bdc42fa 100755
--- a/Admin/gen-uni-tables
+++ b/Admin/gen-uni-tables
@@ -132,9 +132,7 @@ ver=`sed -n -e 's/.*Version \([0-9.]*\).*/\1/p' < "$UCD/ReadMe.txt"`
# Copy necessary files from UCD
for dstfile in "$GNULIB_SRCDIR/tests/uninorm/NormalizationTest.txt" \
"$GNULIB_SRCDIR/tests/uniwbrk/WordBreakTest.txt" \
- "$GNULIB_SRCDIR/tests/unigbrk/GraphemeBreakTest.txt" \
- "$GNULIB_SRCDIR/tests/uniname/UnicodeData.txt" \
- "$GNULIB_SRCDIR/tests/uniname/NameAliases.txt" ; do
+ "$GNULIB_SRCDIR/tests/unigbrk/GraphemeBreakTest.txt" ; do
srcfile=`expr "$dstfile" : '.*/\(.*\)'`
if test -f "$UCD/$srcfile"; then
srcfile="$UCD/$srcfile"
diff --git a/Admin/gen-uninames b/Admin/gen-uninames
index 2b0771a..f57173d 100755
--- a/Admin/gen-uninames
+++ b/Admin/gen-uninames
@@ -103,6 +103,21 @@ sed -e 's/ *$//' -e '/^#/d' -e '/^$/d' < "$UCD/NameAliases.txt" \
"$GNULIB_SRCDIR/lib/uniname/uninames.h" \
"$tmp/NameAliases.txt"
+# Copy necessary files from UCD
+for dstfile in "$GNULIB_SRCDIR/tests/uniname/UnicodeData.txt" \
+ "$GNULIB_SRCDIR/tests/uniname/NameAliases.txt" ; do
+ srcfile=`expr "$dstfile" : '.*/\(.*\)'`
+ if test -f "$UCD/$srcfile"; then
+ srcfile="$UCD/$srcfile"
+ elif test -f "$UCD/auxiliary/$srcfile"; then
+ srcfile="$UCD/auxiliary/$srcfile"
+ else
+ func_fatal_error "cannot find $srcfile"
+ fi
+
+ sed 's/ *$//' < "$srcfile" > "$dstfile"
+done
+
rm -rf "$tmp"
# Undo the effect of the previous 'trap' command. Some shellology: