From 53c2d6449cab219d3b31e01499a897ad6bbd2fe7 Mon Sep 17 00:00:00 2001
From: Jan Mach <jan.mach@cesnet.cz>
Date: Mon, 15 May 2017 20:58:24 +0200
Subject: [PATCH] Fixed the non-functioning archive Grunt subcommand.

(Redmine issue: #3387)
---
 Gruntfile.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Gruntfile.js b/Gruntfile.js
index 4c4e9096..4d7491d7 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -66,7 +66,7 @@ module.exports = function(grunt) {
             },
             // Archive previously built DEB packages from build directory.
             deb_archive: {
-                command: 'if [[ -n $(find <%= project_paths.deploy_dir %> -maxdepth 1 -name *.deb) ]]; then mv -f <%= project_paths.deploy_dir %>*.deb <%= project_paths.archive_dir %>; fi;'
+                command: 'pkgs=`find <%= project_paths.deploy_dir %> -maxdepth 1 -name *.deb` && if [ -n "$pkgs" ]; then mv -f <%= project_paths.deploy_dir %>*.deb <%= project_paths.archive_dir %>; fi;'
             },
             // Build DEB package.
             deb_build: {
-- 
GitLab