Skip to content

Commit 093be00

Browse files
authored
Merge pull request #3215 from jenisys/fix/generate_book_script_on_macOS
FIXES #3214 generate-books.sh: ln --relative not supported on macOS
2 parents 16f3bc0 + ebd5536 commit 093be00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

generate-book.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ fi
88

99
printf '[Introduction](introduction.md)\n\n' > src/SUMMARY.md
1010

11-
find ./text ! -type d -print0 | xargs -0 -I {} ln -frs {} -t src/
11+
find text ! -type d -print0 | xargs -0 -I {} ln -fs ../{} src/
1212

1313
find ./text ! -type d -name '*.md' -print0 \
1414
| sort -z \
1515
| while read -r -d '' file;
1616
do
17-
printf -- '- [%s](%s)\n' "$(basename "$file" ".md")" "$(basename "$file")"
17+
printf -- '- [%s](%s)\n' "$(basename "$file" ".md")" "$(basename "$file")"
1818
done >> src/SUMMARY.md
1919

20-
ln -frs README.md src/introduction.md
20+
ln -fs ../README.md src/introduction.md
2121

2222
mdbook build

0 commit comments

Comments
 (0)