From fcb3d85f34c51637c630f885c2cf0d2d0f156521 Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Thu, 15 Mar 2018 20:54:19 +0100 Subject: [PATCH] composer update: fixed unless cmd by using -gt instead of > (Command was not working on Ubuntu 16.04.) Both Ubuntu's and RedHat's man pages of test list -gt, but not > as their 'greater than' operator. --- php/composer.sls | 2 +- php/ng/composer.sls | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php/composer.sls b/php/composer.sls index bc9f999..b316f0d 100644 --- a/php/composer.sls +++ b/php/composer.sls @@ -41,7 +41,7 @@ install-composer: update-composer: cmd.run: - name: "{{ install_file }} selfupdate" - - unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") \> $(date "+%s") + - unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s") - cwd: {{ php.local_bin }} - env: - HOME: {{ salt_user_home }} diff --git a/php/ng/composer.sls b/php/ng/composer.sls index b20f7c4..a4b7442 100644 --- a/php/ng/composer.sls +++ b/php/ng/composer.sls @@ -49,7 +49,7 @@ install-composer: update-composer: cmd.run: - name: "{{ install_file }} selfupdate" - - unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") \> $(date "+%s") + - unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s") - cwd: {{ php.lookup.pkgs.local_bin }} - env: - HOME: {{ salt_user_home }}