style(helpers): make comment header style consistent

This commit is contained in:
Asif Bacchus 2021-07-27 16:00:30 -06:00
parent 92c0217374
commit fb81443cba
1 changed files with 8 additions and 8 deletions

View File

@ -6,6 +6,7 @@
# TODO: add error trapping on docker run statements # TODO: add error trapping on docker run statements
#
# text formatting presets # text formatting presets
if command -v tput >/dev/null; then if command -v tput >/dev/null; then
cyan=$(tput bold)$(tput setaf 6) cyan=$(tput bold)$(tput setaf 6)
@ -23,7 +24,8 @@ else
width=80 width=80
fi fi
### parameter defaults #
# parameter defaults
doShell=false doShell=false
doStatus=false doStatus=false
doStop=false doStop=false
@ -40,8 +42,8 @@ volumeMounts=""
stopErr=0 stopErr=0
removeErr=0 removeErr=0
### functions #
# functions
checkExist() { checkExist() {
if [ "$1" = 'file' ]; then if [ "$1" = 'file' ]; then
if [ ! -f "$2" ]; then if [ ! -f "$2" ]; then
@ -119,7 +121,8 @@ textBlockParam() {
fi fi
} }
### pre-requisite checks #
# pre-requisite checks
# is docker installed? # is docker installed?
if ! command -v docker >/dev/null; then if ! command -v docker >/dev/null; then
@ -135,6 +138,7 @@ if [ ! "$(id -u)" -eq 0 ]; then
fi fi
fi fi
#
# process startup parameters # process startup parameters
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
@ -187,7 +191,6 @@ if [ "$doStatus" = "true" ]; then
exit 0 exit 0
fi fi
# #
# stop container # stop container
if [ "$doStop" = "true" ]; then if [ "$doStop" = "true" ]; then
@ -223,7 +226,6 @@ if [ "$doStop" = "true" ]; then
exit 0 exit 0
fi fi
# #
# run container # run container
@ -277,7 +279,6 @@ volumeMounts=${volumeMounts##[[:space:]]}
# handle null HOSTNAMES # handle null HOSTNAMES
if [ -z "$HOSTNAMES" ]; then HOSTNAMES="_"; fi if [ -z "$HOSTNAMES" ]; then HOSTNAMES="_"; fi
# create network if it doesn't already exist # create network if it doesn't already exist
docker network inspect ${NETWORK} >/dev/null 2>&1 || docker network inspect ${NETWORK} >/dev/null 2>&1 ||
docker network create \ docker network create \
@ -360,7 +361,6 @@ fi
# exit gracefully # exit gracefully
exit 0 exit 0
# #
# exit return codes # exit return codes
# 0: normal exit, no errors # 0: normal exit, no errors