|
29 | 29 | # https://github.com/spyder-ide/spyder-docs doc --enable all --disable line-too-long |
30 | 30 | # https://github.com/sympy/sympy doc |
31 | 31 | # https://github.com/sphinx-doc/sphinx doc --enable line-too-long --max-line-length 85 |
32 | | - |
33 | | -# This one could be enabled soon: |
34 | | -## https://github.com/python/python-docs-fr . --enable all --disable line-too-long |
| 32 | +# https://github.com/python/python-docs-fr . --enable all --disable line-too-long |
35 | 33 |
|
36 | 34 | grep '^# https://' "$0" | |
37 | 35 | while read -r _ repo directory flags |
38 | 36 | do |
39 | 37 | name="$(basename "$repo")" |
40 | | - if ! [ -d "tests/fixtures/friends/$name" ] |
| 38 | + target="tests/fixtures/friends/$name" |
| 39 | + rm -fr "$target" |
| 40 | + if [ "$directory" = "." ] |
41 | 41 | then |
42 | | - if [ "$directory" != "." ] |
43 | | - then |
44 | | - git clone --depth 1 --sparse --filter=blob:none "$repo" "tests/fixtures/friends/$name" && |
45 | | - ( |
46 | | - cd "tests/fixtures/friends/$name" || exit |
47 | | - rm * # Removes files at root of repo (READMEs, conftest.py, ...) |
48 | | - git sparse-checkout init --cone |
49 | | - git sparse-checkout set "$directory" |
50 | | - ) |
51 | | - else |
52 | | - git clone --depth 1 "$repo" "tests/fixtures/friends/$name" |
53 | | - fi |
| 42 | + git clone --depth 1 "$repo" "tests/fixtures/friends/$name" |
| 43 | + else |
| 44 | + git clone --depth 1 --sparse --filter=blob:none "$repo" "tests/fixtures/friends/$name" && |
| 45 | + ( |
| 46 | + cd "tests/fixtures/friends/$name" || exit |
| 47 | + rm * # Removes files at root of repo (READMEs, conftest.py, ...) |
| 48 | + git sparse-checkout init --cone |
| 49 | + git sparse-checkout set "$directory" |
| 50 | + ) |
54 | 51 | fi |
55 | 52 | printf "%s\n" "$flags" > "tests/fixtures/friends/$name/flags" |
56 | 53 | done |
|
0 commit comments