Skip to content

Commit 709829c

Browse files
committed
chore: format the docs generation script
1 parent cda9e9b commit 709829c

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

docs/generate.sh

+33-33
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,32 @@ fi
4545
eval set -- "$TEMPARGS"
4646

4747
while true; do
48-
case "$1" in
49-
-o|--out)
50-
OUTDIR=$(realpath "$2")
51-
shift 2
52-
;;
53-
-p|--pypath)
54-
PYTHONPATH=$(realpath "$2"):"$PYTHONPATH"
55-
shift 2
56-
;;
57-
-b|--sphinx-build)
58-
SPHINXBIN=$(realpath "$2")
59-
shift 2
60-
;;
61-
-t|--themepath)
62-
THEMEPATH=$(realpath "$2")
63-
shift 2
64-
;;
65-
--)
66-
shift
67-
break
68-
;;
69-
*)
70-
echo Error
71-
exit 1
72-
;;
73-
esac
48+
case "$1" in
49+
-o | --out)
50+
OUTDIR=$(realpath "$2")
51+
shift 2
52+
;;
53+
-p | --pypath)
54+
PYTHONPATH=$(realpath "$2"):"$PYTHONPATH"
55+
shift 2
56+
;;
57+
-b | --sphinx-build)
58+
SPHINXBIN=$(realpath "$2")
59+
shift 2
60+
;;
61+
-t | --themepath)
62+
THEMEPATH=$(realpath "$2")
63+
shift 2
64+
;;
65+
--)
66+
shift
67+
break
68+
;;
69+
*)
70+
echo Error
71+
exit 1
72+
;;
73+
esac
7474
done
7575

7676
TARGET="$1"
@@ -90,7 +90,7 @@ DEVSITE_PATH='/docs/reference/functions-python'
9090
#
9191
PROJDIR=$(mktemp -d)
9292
echo Created project directory: "$PROJDIR"
93-
pushd "$PROJDIR" > /dev/null
93+
pushd "$PROJDIR" >/dev/null
9494
mkdir _build
9595

9696
cat >conf.py <<EOL
@@ -110,8 +110,8 @@ def setup(app):
110110
app.set_translator('html', devsite_translator.html.FiresiteHTMLTranslator)
111111
EOL
112112

113-
for m in ${PY_MODULES};
114-
do cat >"$m".rst <<EOL
113+
for m in ${PY_MODULES}; do
114+
cat >"$m".rst <<EOL
115115
${m} module
116116
===============================================================================
117117
@@ -133,7 +133,7 @@ ${TITLE}
133133
EOL
134134

135135
for m in ${PY_MODULES}; do
136-
echo " ${m}" >> index.rst
136+
echo " ${m}" >>index.rst
137137
done
138138

139139
#
@@ -170,8 +170,8 @@ toc:
170170
path: ${DEVSITE_PATH}/
171171
EOL
172172
for m in ${PY_MODULES}; do
173-
echo "- title: ${m}" >> "$TOC"
174-
echo " path: ${DEVSITE_PATH}/${m}" >> "$TOC"
173+
echo "- title: ${m}" >>"$TOC"
174+
echo " path: ${DEVSITE_PATH}/${m}" >>"$TOC"
175175
done
176176

177-
popd > /dev/null
177+
popd >/dev/null

0 commit comments

Comments
 (0)