You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2016/09/07 11:54:08 UTC

[Bug 59321] bootstrap/bin/ant script fails when building ant with syntax error, possibly an un-matched quote

https://bz.apache.org/bugzilla/show_bug.cgi?id=59321

--- Comment #8 from jpenman.smithson@gmail.com <jp...@gmail.com> ---
I've tried the wrapper script from:

https://git-wip-us.apache.org/repos/asf?p=ant.git;a=blob_plain;f=src/script/ant;h=043f3fc20f8e26d76761d0efcd9d485078a81cca;hb=ad8630572286b10e845e74988b45028af3094266


...and the problem still occurred:

$ ./ant
./ant: syntax error at line 339: `end of file' unexpected

.. tested on:

Solaris 10 10/09 s10x_u8wos_08a X86
Solaris 10 6/06 s10x_u2wos_09a X86

Using bash instead of sh on Solaris works however.

So the diff 'vs' the ant wrapper script in 1.9.7 is:

@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash

 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -36,7 +36,7 @@
       show_help=true
     fi
     # wrap all arguments as "" strings, escape any internal back-slash or
double-quote characters
-    ant_exec_args="$ant_exec_args \"$(printf '%s' "$arg" | sed -e
's@"\|\\@\\\0@g' )\""
+    ant_exec_args="$ant_exec_args \"$(printf '%s\n' "$arg" | sed -e
's@"\|\\@\\\0@g' )\""
   fi
 done

$ ant -version
Apache Ant(TM) version 1.9.7 compiled on April 9 2016

-- 
You are receiving this mail because:
You are the assignee for the bug.