fixed shellcheck version

This commit is contained in:
Georg Lauterbach 2020-09-08 19:49:19 +02:00
parent f7ca406ec9
commit 323303431a
No known key found for this signature in database
GPG key ID: 386D76E7AD496709
5 changed files with 11 additions and 8 deletions

View file

@ -9,7 +9,7 @@ sudo: required
env:
global:
- HADOLINT_VERSION=1.17.1
- SHELLCHECK_VERSION=latest
- SHELLCHECK_VERSION=0.7.1
addons:
apt:
@ -22,7 +22,7 @@ services:
before_install:
- sudo curl -L https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$(uname -s)-$(uname -m) -o /usr/local/bin/hadolint
- sudo chmod +rx /usr/local/bin/hadolint
- sudo wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJv
- sudo wget -qO- "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJv
- sudo cp "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
install:

View file

@ -168,9 +168,10 @@ shellcheck:
@ shellcheck --version
@ echo ''
# currently without `start-mailserver` as this is to be merged separately
@ if find -iname "*.sh" -not -path "./test/*" -not -path "./target/docker-configomat/*" -not -wholename ./target/start-mailserver.sh -exec shellcheck -S style -Cauto -e SC2250,SC2154 -W 50 {} \; | grep .; then\
@ if find -iname "*.sh" -not -path "./test/*" -not -path "./target/docker-configomat/*" -not -wholename ./target/start-mailserver.sh -exec shellcheck -S style -Cauto -o all -e SC2250,SC2154 -W 50 {} \; | grep .; then\
echo -e "\nError" ;\
exit 1 ;\
else\
echo -e '\nSuccess' ;\
fi

View file

@ -30,7 +30,9 @@ function _get_current_directory()
fi
}
CDIR="$(pwd)" ; _get_current_directory
CDIR="$(pwd)"
_get_current_directory
CRI=
INFO=
IMAGE_NAME=

View file

@ -149,11 +149,11 @@ do
# test if user has a defined quota
if [[ -f /tmp/docker-mailserver/dovecot-quotas.cf ]]
then
IFS=':'
read -r -a user_quota < <(grep "${user}@${domain}:" -i /tmp/docker-mailserver/dovecot-quotas.cf)
declare -a USER_QUOTA
IFS=':' ; read -r -a USER_QUOTA < <(grep "${user}@${domain}:" -i /tmp/docker-mailserver/dovecot-quotas.cf)
unset IFS
[[ ${#user_quota[@]} -eq 2 ]] && user_attributes="${user_attributes}userdb_quota_rule=*:bytes=${user_quota[1]}"
[[ ${#USER_QUOTA[@]} -eq 2 ]] && user_attributes="${user_attributes}userdb_quota_rule=*:bytes=${USER_QUOTA[1]}"
fi
echo "${login} ${domain}/${user}/" >>/etc/postfix/vmailbox

View file

@ -145,7 +145,7 @@ function _notify()
* ) options="-e" ;;
esac
[[ -n "${msg}" ]] && echo ${options} "${msg}"
[[ -n "${msg}" ]] && echo "${options}" "${msg}"
}
export -f _notify