#!/bin/sh

# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Regenerate unicode files
pushd ../gnulib-bb5bb43/lib
gcc -Iunictype -o gen-uni-tables gen-uni-tables.c
mv ../../*.txt .
./gen-uni-tables UnicodeData-15.0.0.txt PropList-15.0.0.txt DerivedCoreProperties-15.0.0.txt emoji-data-15.0.0.txt ArabicShaping-15.0.0.txt Scripts-15.0.0.txt Blocks-15.0.0.txt PropList-3.0.1.txt EastAsianWidth-15.0.0.txt LineBreak-15.0.0.txt WordBreakProperty-15.0.0.txt GraphemeBreakProperty-15.0.0.txt CompositionExclusions-15.0.0.txt SpecialCasing-15.0.0.txt CaseFolding-15.0.0.txt 15.0
popd

../gnulib-bb5bb43/gnulib-tool --import --local-dir=gl \
 --lib=libcoreutils \
 --source-base=lib \
 --m4-base=m4 \
 --doc-base=doc \
 --tests-base=gnulib-tests \
 --aux-dir=build-aux \
 --with-tests \
 --makefile-name=gnulib.mk \
 --automake-subdir \
 --no-conditional-dependencies \
 --no-libtool \
 --macro-prefix=gl \
 --avoid=canonicalize-lgpl \
 --avoid=dummy \
 acl \
 alignalloc \
 alignasof \
 alloca \
 announce-gen \
 areadlink-with-size \
 areadlinkat-with-size \
 argmatch \
 argv-iter \
 assert \
 assert-h \
 assure \
 attribute \
 autobuild \
 backup-rename \
 backupfile \
 base32 \
 base64 \
 btowc \
 buffer-lcm \
 byteswap \
 c-strcase \
 calloc-gnu \
 canon-host \
 canonicalize \
 chmodat \
 chown \
 chownat \
 cl-strtod \
 cl-strtold \
 cloexec \
 closein \
 closeout \
 config-h \
 configmake \
 copy-file-range \
 count-leading-zeros \
 crypto/md5 \
 crypto/sha1 \
 crypto/sha256 \
 crypto/sha512 \
 crypto/sm3 \
 cycle-check \
 d-ino \
 d-type \
 di-set \
 dirfd \
 dirname \
 do-release-commit-and-tag \
 dtoastr \
 dup2 \
 environ \
 error \
 euidaccess \
 exclude \
 exitfail \
 explicit_bzero \
 faccessat \
 fadvise \
 fchdir \
 fchmodat \
 fchownat \
 fclose \
 fcntl \
 fcntl-safer \
 fd-reopen \
 fdatasync \
 fdopen \
 fdutimensat \
 file-has-acl \
 file-type \
 fileblocks \
 filemode \
 filenamecat \
 filevercmp \
 flexmember \
 fnmatch-gnu \
 fopen-safer \
 fprintftime \
 fpurge \
 free-posix \
 freopen \
 freopen-safer \
 fseeko \
 fstatat \
 fsusage \
 fsync \
 ftoastr \
 ftruncate \
 fts \
 full-read \
 full-write \
 getgroups \
 gethrxtime \
 getline \
 getloadavg \
 getlogin \
 getndelim2 \
 getopt-gnu \
 getpagesize \
 getpass-gnu \
 gettext-h \
 gettime \
 gettime-res \
 getugroups \
 getusershell \
 git-version-gen \
 gitlog-to-changelog \
 gnu-make \
 gnu-web-doc-update \
 gnumakefile \
 gnupload \
 group-member \
 hard-locale \
 hash \
 hash-triple \
 heap \
 host-os \
 human \
 idcache \
 idx \
 ignore-value \
 inttostr \
 inttypes \
 isapipe \
 isatty \
 isblank \
 largefile \
 lchmod \
 lchown \
 ldtoastr \
 lib-ignore \
 libgmp \
 linebuffer \
 link \
 link-follow \
 linkat \
 long-options \
 lstat \
 maintainer-makefile \
 malloc-gnu \
 manywarnings \
 mbrlen \
 mbrtowc \
 mbsalign \
 mbschr \
 mbslen \
 mbswidth \
 memcasecmp \
 memchr \
 memcmp2 \
 mempcpy \
 memrchr \
 mgetgroups \
 minmax \
 mkancesdirs \
 mkdir \
 mkdir-p \
 mkdirat \
 mkfifo \
 mkfifoat \
 mknod \
 mkostemp \
 mkstemp \
 mktime \
 modechange \
 mountlist \
 mpsort \
 netinet_in \
 nproc \
 nstrftime \
 nullptr \
 obstack \
 open \
 openat-safer \
 parse-datetime \
 parse-datetime2 \
 pathmax \
 perl \
 physmem \
 pipe-posix \
 pipe2 \
 posix-shell \
 posixtm \
 posixver \
 priv-set \
 progname \
 propername-lite \
 pthread-cond \
 pthread-mutex \
 pthread-thread \
 pthread_sigmask \
 putenv \
 quote \
 quotearg \
 randint \
 randperm \
 rawmemchr \
 read-file \
 readlink \
 readtokens \
 readtokens0 \
 readutmp \
 realloc-gnu \
 regex \
 remove \
 rename \
 renameat \
 renameatu \
 rmdir \
 root-dev-ino \
 rpmatch \
 safe-read \
 same \
 save-cwd \
 savedir \
 savewd \
 select \
 selinux-at \
 setenv \
 settime \
 sig2str \
 sigaction \
 smack \
 ssize_t \
 stat-macros \
 stat-size \
 stat-time \
 stdbool \
 stdckdint \
 stdlib-safer \
 stpcpy \
 stpncpy \
 strdup-posix \
 strncat \
 strnumcmp \
 strsignal \
 strtoimax \
 strtoumax \
 symlinkat \
 sys_ioctl \
 sys_resource \
 sys_stat \
 sys_wait \
 targetdir \
 tempname \
 termios \
 time_rz \
 timer-time \
 timespec \
 tmpdir \
 tzset \
 uname \
 unicodeio \
 unistd-safer \
 unlink-busy \
 unlinkat \
 unlinkdir \
 unlocked-io \
 unsetenv \
 update-copyright \
 useless-if-before-free \
 userspec \
 utimecmp \
 utimens \
 utimensat \
 vasprintf-posix \
 vc-list-files \
 verify \
 verror \
 version-etc-fsf \
 wchar-single \
 wcswidth \
 wcwidth \
 winsz-ioctl \
 winsz-termios \
 write-any-file \
 xalignalloc \
 xalloc \
 xbinary-io \
 xdectoint \
 xfts \
 xgetcwd \
 xgetgroups \
 xgethostname \
 xmemcoll \
 xnanosleep \
 xprintf \
 xprintf-posix \
 xreadlink \
 xstrtod \
 xstrtoimax \
 xstrtol \
 xstrtol-error \
 xstrtold \
 xstrtoumax \
 year2038-recommended \
 yesno
