date conversion

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2017-07-07 12:38:21 +02:00
parent 6f0303ef56
commit 73afde56d0

View file

@ -20,7 +20,7 @@ note "$check_1_2"
check_1_3="1.3 - Ensure Docker is up to date"
docker_version=$(docker version | grep -i -A1 '^server' | grep -i 'version:' \
| awk '{print $NF; exit}' | tr -d '[:alpha:]-,')
docker_current_version="$(date --date="$(date +%Y-%m-01) -1 month" +%Y-%m-01)"
docker_current_version="$(date --date="$(date +%y-%m-1) -1 month" +%y.%m.0)"
do_version_check "$docker_current_version" "$docker_version"
if [ $? -eq 11 ]; then
info "$check_1_3"