Change 'while' style (#3365)

This commit is contained in:
Casper 2023-05-26 01:39:39 +02:00 committed by GitHub
parent 37ca0f9ba9
commit c2d0b748b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 22 additions and 44 deletions

View file

@ -70,8 +70,7 @@ ${ORANGE}EXIT STATUS${RESET}
}
function _parse_options() {
while getopts ":yY" OPT
do
while getopts ":yY" OPT; do
case "${OPT}" in
( 'y' | 'Y' )
MAILDEL=1

View file

@ -12,8 +12,7 @@ function _list_entries() {
local DATABASE=${1}
_db_should_exist_with_content "${DATABASE}"
while read -r LINE
do
while read -r LINE; do
echo -e "* ${LINE}\n"
done < <(_get_valid_lines_from_file "${DATABASE}")
}

View file

@ -13,8 +13,7 @@ function _list_entries() {
_db_should_exist_with_content "${DATABASE}"
local MASTER_ACCOUNT
while read -r LINE
do
while read -r LINE; do
MASTER_ACCOUNT=$(echo "${LINE}" | cut -d'|' -f1)
echo -e "* ${MASTER_ACCOUNT}\n"

View file

@ -19,8 +19,7 @@ function _list_entries() {
_db_should_exist_with_content "${DATABASE}"
local ENTRY_TO_DISPLAY
while read -r LINE
do
while read -r LINE; do
ENTRY_TO_DISPLAY=$(_format_list_item "${LINE}")
echo -e "* ${ENTRY_TO_DISPLAY}\n"

View file

@ -57,8 +57,7 @@ ${ORANGE}EXIT STATUS${RESET}
_require_n_parameters_or_print_usage 0 "${@}"
while [[ ${#} -gt 0 ]]
do
while [[ ${#} -gt 0 ]]; do
case "${1}" in
( 'keysize' )
if [[ -n ${2+set} ]]; then
@ -124,8 +123,7 @@ if [[ ! -s ${DATABASE_VHOST} ]]; then
exit 0
fi
while read -r DKIM_DOMAIN
do
while read -r DKIM_DOMAIN; do
mkdir -p "/tmp/docker-mailserver/opendkim/keys/${DKIM_DOMAIN}"
if [[ ! -f "/tmp/docker-mailserver/opendkim/keys/${DKIM_DOMAIN}/${SELECTOR}.private" ]]; then

View file

@ -79,8 +79,7 @@ function _parse_arguments() {
_log 'trace' "Options given to this script: '${*}'"
while [[ ${#} -gt 0 ]]
do
while [[ ${#} -gt 0 ]]; do
case "${1}" in
( 'keytype' )