mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
fixed shellcheck version
This commit is contained in:
parent
f7ca406ec9
commit
323303431a
|
@ -9,7 +9,7 @@ sudo: required
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- HADOLINT_VERSION=1.17.1
|
- HADOLINT_VERSION=1.17.1
|
||||||
- SHELLCHECK_VERSION=latest
|
- SHELLCHECK_VERSION=0.7.1
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@ -22,7 +22,7 @@ services:
|
||||||
before_install:
|
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 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 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/
|
- sudo cp "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -168,9 +168,10 @@ shellcheck:
|
||||||
@ shellcheck --version
|
@ shellcheck --version
|
||||||
@ echo ''
|
@ echo ''
|
||||||
# currently without `start-mailserver` as this is to be merged separately
|
# 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" ;\
|
echo -e "\nError" ;\
|
||||||
exit 1 ;\
|
exit 1 ;\
|
||||||
else\
|
else\
|
||||||
echo -e '\nSuccess' ;\
|
echo -e '\nSuccess' ;\
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
4
setup.sh
4
setup.sh
|
@ -30,7 +30,9 @@ function _get_current_directory()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
CDIR="$(pwd)" ; _get_current_directory
|
CDIR="$(pwd)"
|
||||||
|
_get_current_directory
|
||||||
|
|
||||||
CRI=
|
CRI=
|
||||||
INFO=
|
INFO=
|
||||||
IMAGE_NAME=
|
IMAGE_NAME=
|
||||||
|
|
|
@ -149,11 +149,11 @@ do
|
||||||
# test if user has a defined quota
|
# test if user has a defined quota
|
||||||
if [[ -f /tmp/docker-mailserver/dovecot-quotas.cf ]]
|
if [[ -f /tmp/docker-mailserver/dovecot-quotas.cf ]]
|
||||||
then
|
then
|
||||||
IFS=':'
|
declare -a USER_QUOTA
|
||||||
read -r -a user_quota < <(grep "${user}@${domain}:" -i /tmp/docker-mailserver/dovecot-quotas.cf)
|
IFS=':' ; read -r -a USER_QUOTA < <(grep "${user}@${domain}:" -i /tmp/docker-mailserver/dovecot-quotas.cf)
|
||||||
unset IFS
|
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
|
fi
|
||||||
|
|
||||||
echo "${login} ${domain}/${user}/" >>/etc/postfix/vmailbox
|
echo "${login} ${domain}/${user}/" >>/etc/postfix/vmailbox
|
||||||
|
|
|
@ -145,7 +145,7 @@ function _notify()
|
||||||
* ) options="-e" ;;
|
* ) options="-e" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[[ -n "${msg}" ]] && echo ${options} "${msg}"
|
[[ -n "${msg}" ]] && echo "${options}" "${msg}"
|
||||||
}
|
}
|
||||||
export -f _notify
|
export -f _notify
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue