FIXES #3214 generate-books.sh: ln --relative not supported on macOS

* Omit using "ln -r" for symbolic link creation
* Create symbolic links with old style expression
* Creates relative links
This commit is contained in:
jenisys 2022-01-06 12:11:43 +01:00
parent 16f3bc024b
commit ebd55367db
1 changed files with 3 additions and 3 deletions

View File

@ -8,15 +8,15 @@ fi
printf '[Introduction](introduction.md)\n\n' > src/SUMMARY.md
find ./text ! -type d -print0 | xargs -0 -I {} ln -frs {} -t src/
find text ! -type d -print0 | xargs -0 -I {} ln -fs ../{} src/
find ./text ! -type d -name '*.md' -print0 \
| sort -z \
| while read -r -d '' file;
do
printf -- '- [%s](%s)\n' "$(basename "$file" ".md")" "$(basename "$file")"
printf -- '- [%s](%s)\n' "$(basename "$file" ".md")" "$(basename "$file")"
done >> src/SUMMARY.md
ln -frs README.md src/introduction.md
ln -fs ../README.md src/introduction.md
mdbook build