mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-15 03:44:56 +02:00
Complete Refactor for target/bin
(#1654)
* documentation and script updates trying to fix #1647 * preparations for refactoring target/bin/ * complete refactor for target/bin/ * changing script output slightly * outsourcing functions in `bin-helper.sh` * re-wrote linting to allow for proper shellcheck -x execution * show explanation for shellcheck ignore * adding some more information
This commit is contained in:
parent
0ada57d87c
commit
da8171388f
37 changed files with 579 additions and 504 deletions
13
setup.sh
13
setup.sh
|
@ -7,6 +7,7 @@ SCRIPT='SETUP'
|
|||
|
||||
set -euEo pipefail
|
||||
trap '__log_err ${FUNCNAME[0]:-"?"} ${_:-"?"} ${LINENO:-"?"} ${?:-"?"}' ERR
|
||||
trap '_unset_vars || :' EXIT
|
||||
|
||||
function __log_err
|
||||
{
|
||||
|
@ -20,14 +21,13 @@ function __log_err
|
|||
" – function = ${FUNC_NAME}" \
|
||||
" – line = ${LINE}" \
|
||||
" – exit code = ${EXIT_CODE}"
|
||||
|
||||
_unset_vars
|
||||
}
|
||||
|
||||
function _unset_vars
|
||||
{
|
||||
unset CDIR CRI INFO IMAGE_NAME CONTAINER_NAME DEFAULT_CONFIG_PATH
|
||||
unset USE_CONTAINER WISHED_CONFIG_PATH CONFIG_PATH VOLUME USE_TTY
|
||||
unset SCRIPT
|
||||
}
|
||||
|
||||
function _get_current_directory
|
||||
|
@ -340,16 +340,13 @@ function _main
|
|||
_docker_container /bin/bash -c "${@}"
|
||||
fi
|
||||
;;
|
||||
* ) _usage ; _unset_vars ; exit 1 ;;
|
||||
* ) _usage ; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
help) _usage ;;
|
||||
|
||||
* ) _usage ; _unset_vars ; exit 1 ;;
|
||||
help ) _usage ;;
|
||||
* ) _usage ; exit 1 ;;
|
||||
esac
|
||||
|
||||
_unset_vars
|
||||
}
|
||||
|
||||
_main "${@}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue