File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,17 @@ branches:
3
3
only :
4
4
- master
5
5
6
+ cache :
7
+ directories :
8
+ - ~/.cargo
9
+ - target
10
+ before_cache :
11
+ - cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
12
+ - cargo cache
13
+ install :
14
+ - export CARGO_TARGET_DIR=$TRAVIS_BUILD_DIR/target
15
+ - cargo install mdbook
6
16
script :
7
- - (cargo install mdbook --vers '^0.2.0' --force || true)
8
17
- ./generate-book.sh
9
18
10
19
env :
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/ bin/env bash
2
2
3
3
set -e
4
4
5
5
if [ ! -d src ]; then
6
6
mkdir src
7
7
fi
8
8
9
- echo " [Introduction](introduction.md)\n" > src/SUMMARY.md
9
+ printf ' [Introduction](introduction.md)\n\n ' > src/SUMMARY.md
10
10
11
- for f in $( ls text/* | sort)
11
+ find ./text ! -type d -print0 | xargs -0 -I {} ln -frs {} -t src/
12
+
13
+ find ./text ! -type d -name ' *.md' -print0 \
14
+ | sort -z \
15
+ | while read -r -d ' ' file;
12
16
do
13
- echo " - [$( basename $f " .md" ) ]($( basename $f ) )" >> src/SUMMARY.md
14
- cp $f src
15
- done
17
+ printf -- ' - [%s](%s)\n' " $( basename " $file " " .md" ) " " $( basename " $file " ) "
18
+ done >> src/SUMMARY.md
16
19
17
- cp README.md src/introduction.md
20
+ ln -frs README.md src/introduction.md
18
21
19
22
mdbook build
You can’t perform that action at this time.
0 commit comments