diff --git a/docs/bin/ln-sphinx-subprojects b/docs/bin/ln-sphinx-subprojects index f07cc0b..085baff 100755 --- a/docs/bin/ln-sphinx-subprojects +++ b/docs/bin/ln-sphinx-subprojects @@ -1,35 +1,35 @@ #!/bin/bash set -e create_links () { - mkdir sources/ + mkdir -p sources for pymodule in $(cd ../../ && bin/ls-py-modules) ; do if [ "$pymodule" = 'swh-docs' ] ; then continue fi if [ ! -e "$pymodule" -a -d "../../${pymodule}/docs" ] ; then ln -s "../../${pymodule}/docs" "$pymodule" fi if [ -d "../../${pymodule}/swh" ] ; then - cp -fr --link "../../${pymodule}/swh/" "sources/" + rsync -a --include='*.py' --include='*/' --exclude='*' --prune-empty-dirs "../../${pymodule}/swh" "sources/" fi done } remove_links () { for pymodule in $(cd ../../ && bin/ls-py-modules) ; do if [ "$pymodule" = 'swh-docs' ] ; then continue fi if [ -L "$pymodule" ] ; then rm "$pymodule" fi done rm -rf sources } if [ "$1" = "--remove" ] ; then remove_links else create_links fi