2929 path : ' ./coreutils'
3030 fetch-depth : 0
3131
32+ - name : Checkout Coreutils L10n Repository
33+ uses : actions/checkout@v5
34+ with :
35+ repository : uutils/coreutils-l10n
36+ path : ' ./coreutils-l10n'
37+ fetch-depth : 0
38+
3239 - name : Checkout Findutils Repository
3340 uses : actions/checkout@v5
3441 with :
4350 run : |
4451 sudo apt install libacl1-dev libselinux1-dev libsystemd-dev man2html
4552
46- - name : Download tldr archive
47- run : |
48- curl -sfL https://tldr.sh/assets/tldr.zip --output coreutils/docs/tldr.zip
49-
5053 - name : Install necessary tools (mdbook and mdbook-toc)
5154 uses : taiki-e/install-action@v2
5255 with :
@@ -55,27 +58,16 @@ jobs:
5558 - name : Build Coreutils Docs
5659 run : |
5760 cd coreutils
61+ curl -sfL https://github.com/tldr-pages/tldr/releases/download/v2.3/tldr-pages.zip -o docs/tldr.zip || true
5862 cargo run --bin uudoc --all-features
5963 cd docs
6064 # Remove deprecated 'multilingual' field unsupported by newer mdbook
6165 sed -i '/^multilingual/d' book.toml
6266 mdbook build
6367
64- - name : Generate Coreutils Manpages
65- run : |
66- cd coreutils
67- make install-manpages DESTDIR=../manpages
68-
69- - name : Convert Manpages to HTML and Generate Index
68+ - name : Build Coreutils Manpages (all languages)
7069 run : |
71- # Extract tldr pages for examples
72- mkdir -p tldr-pages
73- if [ -f coreutils/docs/tldr.zip ]; then
74- unzip -o coreutils/docs/tldr.zip -d tldr-extract
75- find tldr-extract -name "*.md" -exec cp {} tldr-pages/ \;
76- fi
77-
78- uutils.github.io/scripts/build-manpages.sh manpages tldr-pages manpages-html uutils.github.io/templates
70+ uutils.github.io/scripts/build-all-manpages.sh coreutils coreutils-l10n manpages-html uutils.github.io/templates
7971
8072 - name : Build Findutils Docs
8173 run : |
9587 cp -r uutils.github.io/public public
9688 cp -r coreutils/docs/book public/coreutils/docs
9789 cp -r findutils/docs/book public/findutils/docs
90+ # Copy English manpages to /coreutils/manpages/
9891 mkdir -p public/coreutils/manpages
99- cp -r manpages-html/* public/coreutils/manpages/
92+ cp -r manpages-html/en/* public/coreutils/manpages/
93+ # Copy translated manpages to /coreutils/manpages-{lang}/
94+ for lang_dir in manpages-html/*/; do
95+ lang=$(basename "$lang_dir")
96+ [ "$lang" = "en" ] && continue
97+ mkdir -p "public/coreutils/manpages-${lang}"
98+ cp -r "${lang_dir}"* "public/coreutils/manpages-${lang}/"
99+ done
100100
101101 - name : Upload artifact for checking the output
102102 uses : actions/upload-artifact@v4
0 commit comments