Bug 17717: (QA follow-up) Fix typo chdir
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 5 Mar 2018 10:30:15 +0000 (11:30 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 10 Apr 2018 07:17:08 +0000 (09:17 +0200)
This test does obviously not achieve the desired result:
    [ "chdir" != "no" ]
Trivial fix.
Adding the same quotes around starting_dir (just as for Bug 19546).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7c55ea5917998bc210d3ee632f0a8ea6beefff5f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

debian/scripts/koha-foreach

index 47f92c5..9682f14 100755 (executable)
@@ -59,11 +59,11 @@ do
     if [ "${cmd}" != "" ]; then
 
         # Change to the instance's home dir if required
-        [ "chdir" != "no" ] && eval cd ~$name"-koha"
+        [ "$chdir" != "no" ] && eval cd ~$name"-koha"
 
         koha-shell ${name} -c "${cmd}"
 
         # Go back to the original dir if required
-        [ "chdir" != "no" ] && cd $starting_dir
+        [ "$chdir" != "no" ] && cd "$starting_dir"
     fi
 done