File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 13
13
# Add any Sphinx extension module names here, as strings. They can be
14
14
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
15
15
# ones.
16
- extensions = []
16
+ sys .path += ['.' ]
17
+ extensions = [
18
+ 'sphinxcontrib_rawfiles' ,
19
+ ]
20
+ rawfiles = ['install.sh' ]
17
21
18
22
# Add any paths that contain templates here, relative to this directory.
19
23
templates_path = ['_templates' ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Automatically installs swiftenv and run's swiftenv install.
4
+ # This script was designed for usage in CI systems.
5
+
6
+ git clone --depth 1 https://github.com/kylef/swiftenv.git ~ /.swiftenv
7
+ export SWIFTENV_ROOT=" $HOME /.swiftenv"
8
+ export PATH=" $SWIFTENV_ROOT /bin:$SWIFTENV_ROOT /shims:$PATH "
9
+
10
+ if [ -f " .swift-version" ] || [ -n " $SWIFT_VERSION " ]; then
11
+ swiftenv install -s
12
+ else
13
+ swiftenv rehash
14
+ fi
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ import os
3
+ import shutil
4
+
5
+ def on_html_collect_pages (app ):
6
+ for f in app .builder .config .rawfiles :
7
+ src = os .path .join (app .srcdir , f )
8
+ dst = os .path .join (app .builder .outdir , f )
9
+ if os .path .isfile (src ):
10
+ shutil .copy (src , dst )
11
+ else :
12
+ shutil .copytree (src , dst )
13
+
14
+ return ()
15
+
16
+ def setup (app ):
17
+ app .add_config_value ('rawfiles' , [], 'html' )
18
+ app .connect ("html-collect-pages" , on_html_collect_pages )
You can’t perform that action at this time.
0 commit comments