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