From 6161d80465c0c207df148686fb7b5dff1c83f247 Mon Sep 17 00:00:00 2001
From: MJ Ray <mjr@phonecoop.coop>
Date: Tue, 11 Dec 2012 14:17:36 +0000
Subject: [PATCH] [SIGNED-OFF] Bug 9260: stop koha-run-backups complaining
 "missing ]"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Found because cron.daily/koha output contains the error "[: 97: missing ]"

To test:

  1. run koha-run-backups --days 2 --output /var/spool/koha
  2. should see no output

Sponsored-by: Library of the Józef Piłsudski Institute of America
Signed-off-by: Vitor FERNANDES <vfernandes@keep.pt>
---
 debian/scripts/koha-run-backups |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/scripts/koha-run-backups b/debian/scripts/koha-run-backups
index 0aafc52..74f879b 100755
--- a/debian/scripts/koha-run-backups
+++ b/debian/scripts/koha-run-backups
@@ -58,7 +58,7 @@ done
 for name in $(koha-list --enabled | grep -Fxv demo)
 do
     koha-dump "$name" > /dev/null
-    if [ -z "$dirname"]; then
+    if [ -z "$dirname" ]; then
         backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )";
     else
         backupdir="$dirname/$name";
-- 
1.7.9.5