beautysh: re-format
beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I584c76da2eb35af2177a97d5cd4b882f9881fb80
diff --git a/templates/bash_simple_template b/templates/bash_simple_template
index 306a105..4d68687 100755
--- a/templates/bash_simple_template
+++ b/templates/bash_simple_template
@@ -8,56 +8,56 @@
# parm1 Bla, bla, bla (e.g. "example data").
-function get_parms {
+function get_parms() {
- # Get program parms.
+ # Get program parms.
- parm1="${1}" ; shift
+ parm1="${1}" ; shift
- return 0
+ return 0
}
-function exit_function {
+function exit_function() {
- return
+ return
}
-function validate_parms {
+function validate_parms() {
- # Validate program parameters.
+ # Validate program parameters.
- # Your validation code here.
+ # Your validation code here.
- if [ -z "${parm1}" ] ; then
- echo "**ERROR** You must provide..." >&2
- return 1
- fi
+ if [ -z "${parm1}" ] ; then
+ echo "**ERROR** You must provide..." >&2
+ return 1
+ fi
- trap "exit_function $signal \$?" EXIT
+ trap "exit_function $signal \$?" EXIT
- return 0
+ return 0
}
-function mainf {
+function mainf() {
- get_parms "$@" || return 1
+ get_parms "$@" || return 1
- validate_parms || return 1
+ validate_parms || return 1
- # Your code here...
+ # Your code here...
- return 0
+ return 0
}
# Main
- mainf "${@}"
- rc="${?}"
- exit "${rc}"
+mainf "${@}"
+rc="${?}"
+exit "${rc}"