wafsamba: replace 'echo -n' with printf
authorSergey V. Lobanov <sergey@lobanov.in>
Wed, 9 Feb 2022 21:02:17 +0000 (00:02 +0300)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 11 Feb 2022 07:58:57 +0000 (07:58 +0000)
This patch makes samba_cross.py compatible with old bash (e.g. 3.2)

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Feb 11 07:58:57 UTC 2022 on sn-devel-184

buildtools/wafsamba/samba_cross.py

index 0868a855a0da760e17a9017eafd68c66f6b6a87f..c6f8c2a0ef2fe1797d41e923273eb6461a1f18cb 100644 (file)
@@ -134,7 +134,7 @@ class cross_Popen(Utils.subprocess.Popen):
                 cross_answers_incomplete = True
                 add_answer(ca_file, msg, ans)
             (retcode, retstring) = ans
-            args = ['/bin/sh', '-c', "echo -n '%s'; exit %d" % (retstring, retcode)]
+            args = ['/bin/sh', '-c', "printf %%s '%s'; exit %d" % (retstring, retcode)]
         real_Popen.__init__(*(obj, args), **kw)