summaryrefslogtreecommitdiff
path: root/Admin/gen-uninames
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 /Admin/gen-uninames
parent5f46af6783b2a5df68a623ce15b01273dc29c74f (diff)
downloadlibunistring-e537d35f0804b11b205515febc1102a1ac95effa.tar.gz
maint: Make gen-uninames script self-contained
Copy necessary UCD files for the tests.
Diffstat (limited to 'Admin/gen-uninames')
-rwxr-xr-xAdmin/gen-uninames15
1 files changed, 15 insertions, 0 deletions
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: