summaryrefslogtreecommitdiff
path: root/manage
diff options
context:
space:
mode:
Diffstat (limited to 'manage')
-rwxr-xr-xmanage15
1 files changed, 14 insertions, 1 deletions
diff --git a/manage b/manage
index 7d2305e65..df1c01c21 100755
--- a/manage
+++ b/manage
@@ -64,6 +64,12 @@ RST_FILES=(
'README.rst'
)
+SHFMT_SCRIPTS=(
+ "./manage"
+ "./container"
+ "./utils"
+)
+
help() {
nvm.help
cat <<EOF
@@ -90,6 +96,7 @@ pyenv.:
OK : test if virtualenv is OK
format.:
python : format Python code source using black
+ shell : format Shell scripts using shfmt
EOF
go.help
node.help
@@ -248,11 +255,17 @@ pyenv.uninstall() {
}
format.python() {
- build_msg TEST "[format.python] black \$BLACK_TARGETS"
+ build_msg TEST "[format.python] black ${BLACK_TARGETS[*]}"
pyenv.cmd black "${BLACK_OPTIONS[@]}" "${BLACK_TARGETS[@]}"
dump_return $?
}
+format.shell() {
+ build_msg TEST "[shfmt] shfmt ${SHFMT_SCRIPTS[*]}"
+ go.tool shfmt --list --write "${SHFMT_SCRIPTS[@]}"
+ dump_return $?
+}
+
docs.prebuild() {
build_msg DOCS "build ${DOCS_BUILD}/includes"
(