style(HELPERSCRIPTS): reformat code

This commit is contained in:
Asif Bacchus 2021-01-15 06:11:24 -07:00
parent 9d5c7960c9
commit db4be32b54

View File

@ -102,19 +102,18 @@ doScriptUpdate=1
localScriptName="$(basename "$0")" localScriptName="$(basename "$0")"
repoScriptName='update.sh' repoScriptName='update.sh'
### process startup parameters ### process startup parameters
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
-h|-\?|--help) -h | -\? | --help)
# display inline help # display inline help
scriptHelp scriptHelp
;; ;;
-s|--scripts|--scripts-only) -s | --scripts | --scripts-only)
# update scripts only, skip docker container update # update scripts only, skip docker container update
doDockerUpdate=0 doDockerUpdate=0
;; ;;
-c|--container|--container-only) -c | --container | --container-only)
# update docker container only, skip script update # update docker container only, skip script update
doScriptUpdate=0 doScriptUpdate=0
;; ;;
@ -124,10 +123,9 @@ while [ $# -gt 0 ]; do
exit 1 exit 1
;; ;;
esac esac
shift shift
done done
### update container ### update container
if [ "$doDockerUpdate" -eq 1 ]; then if [ "$doDockerUpdate" -eq 1 ]; then
# check if docker is installed # check if docker is installed
@ -150,7 +148,6 @@ if [ "$doDockerUpdate" -eq 1 ]; then
fi fi
fi fi
### update scripts ### update scripts
if [ "$doScriptUpdate" -eq 1 ]; then if [ "$doScriptUpdate" -eq 1 ]; then
printf "%s*** Updating %s service scripts ***%s\n" "$info" "$containerName" "$norm" printf "%s*** Updating %s service scripts ***%s\n" "$info" "$containerName" "$norm"
@ -242,7 +239,6 @@ if [ "$doScriptUpdate" -eq 1 ]; then
done <"$checksumFilename" done <"$checksumFilename"
fi fi
### display results ### display results
if [ "$doScriptUpdate" -eq 1 ]; then if [ "$doScriptUpdate" -eq 1 ]; then
printf "\n%s*** Results ***%s\n" "$info" "$norm" printf "\n%s*** Results ***%s\n" "$info" "$norm"