mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add maintenante/shfmt.sh for shell script formatting
Thanks @selfhoster1312 <3
This commit is contained in:
parent
b91e9dd8f4
commit
68f35831e7
1 changed files with 16 additions and 0 deletions
16
maintenance/shfmt.sh
Executable file
16
maintenance/shfmt.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
shfmt_args=(
|
||||
--indent 4
|
||||
--keep-padding # keep column alignment paddings
|
||||
--space-redirects # redirect operators will be followed by a space
|
||||
--binary-next-line # binary ops like && and | may start a line
|
||||
--case-indent # switch cases will be indented
|
||||
)
|
||||
|
||||
shfmt "${shfmt_args[@]}" "$@" \
|
||||
helpers/helpers \
|
||||
helpers/helpers.v2.1.d/* \
|
||||
helpers/helpers.v2.d/* \
|
||||
hooks/*
|
Loading…
Add table
Reference in a new issue