diff options
author | Daiki Ueno <ueno@gnu.org> | 2016-09-12 10:24:05 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2016-09-12 10:28:26 +0200 |
commit | e537d35f0804b11b205515febc1102a1ac95effa (patch) | |
tree | b02bd81c1cd11c46d8b5f252338fbdfe4373c29a | |
parent | 5f46af6783b2a5df68a623ce15b01273dc29c74f (diff) | |
download | libunistring-e537d35f0804b11b205515febc1102a1ac95effa.tar.gz |
maint: Make gen-uninames script self-contained
Copy necessary UCD files for the tests.
-rwxr-xr-x | Admin/gen-uni-tables | 4 | ||||
-rwxr-xr-x | Admin/gen-uninames | 15 |
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: |