Skip to content

Commit dc415b9

Browse files
committed
Simplify 'download-more-tests' and add python-docs-fr :)
1 parent 42f1b98 commit dc415b9

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

download-more-tests.sh

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,25 @@
2929
# https://github.com/spyder-ide/spyder-docs doc --enable all --disable line-too-long
3030
# https://github.com/sympy/sympy doc
3131
# 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
3533

3634
grep '^# https://' "$0" |
3735
while read -r _ repo directory flags
3836
do
3937
name="$(basename "$repo")"
40-
if ! [ -d "tests/fixtures/friends/$name" ]
38+
target="tests/fixtures/friends/$name"
39+
rm -fr "$target"
40+
if [ "$directory" = "." ]
4141
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+
)
5451
fi
5552
printf "%s\n" "$flags" > "tests/fixtures/friends/$name/flags"
5653
done

0 commit comments

Comments
 (0)