File: build_theme.sh

package info (click to toggle)
scikit-misc 0.1.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 960 kB
  • sloc: fortran: 2,217; python: 2,023; ansic: 1,352; sh: 138; makefile: 97; javascript: 60
file content (29 lines) | stat: -rwxr-xr-x 856 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env sh

# This script makes it easy to recompile install and tryout
# a theme in case of any changes. It assumes the
# sphinx-bootstrap-theme-customizer package is in the same directory
# as the package, i.e one up the git toplevel.

color5=$(tput setaf 5)
reset=$(tput sgr0)      # reset color codes

toplevel=$(git rev-parse --show-toplevel)
bootstrap=$(basename $(ls -d theme/static/bootstrap-*/))

# Compile theme
cd $toplevel/../sphinx-bootstrap-theme-customizer/
./build "$@"

# Copy theme for sphinx to use
rm -rf $toplevel/doc/theme
cp -rf theme $toplevel/doc

# Do a hotswap (it may be enough for us to see the results compared to
# regenerating the html)

cd $toplevel
mkdir -p doc/_build/html/_static/$bootstrap/css
cp $toplevel/doc/{theme/static,_build/html/_static}/$bootstrap/css/bootstrap.min.css

echo "${color5}success${reset}"