Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A1D20200BF8 for ; Fri, 13 Jan 2017 19:35:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 90657160B47; Fri, 13 Jan 2017 18:35:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DB298160B2E for ; Fri, 13 Jan 2017 19:35:09 +0100 (CET) Received: (qmail 13640 invoked by uid 500); 13 Jan 2017 18:35:09 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 13629 invoked by uid 99); 13 Jan 2017 18:35:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2017 18:35:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AFB47DFC15; Fri, 13 Jan 2017 18:35:08 +0000 (UTC) From: jwadamson To: dev@ant.apache.org Reply-To: dev@ant.apache.org Message-ID: Subject: [GitHub] ant pull request #29: detect solaris 10 to avoid certain POSIX expressions Content-Type: text/plain Date: Fri, 13 Jan 2017 18:35:08 +0000 (UTC) archived-at: Fri, 13 Jan 2017 18:35:10 -0000 GitHub user jwadamson opened a pull request: https://github.com/apache/ant/pull/29 detect solaris 10 to avoid certain POSIX expressions Another attempt at fixing for solaris without regressing POSIX platforms. 1) use `uname` to detect solaris 10 platform. Could not figure out a way via feature-detection to make change specific to the heirloom-sh found on it. Can be overridden via env PROTECT_NL=true|false. 2) esc_arg sed line is now done with `` instead of $(), due to heirloom compatibility. 3) ant_exec_debug final printing should have used printf instead of echo for accuracy of output 4) padding protection only was needed on the end of the processing argument and only for non-heirloom. I tested with arguments for empty-string and the 6 most special characters (dollar, double-quote, backtick, singlequote, backslash, newline): --execdebug -version '' '$' '"' '`' "'" '\\' ' ' Worked on ubuntu 14.04, and with Solaris 10 with the caviat newlines get trimmed from arguments on Solaris 10 e.g. the newline-only argument was translated into an empty-string. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jwadamson/ant-1 1.9.x Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ant/pull/29.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #29 ---- commit 2b2e4b8bc4038cbdd1a01451d1fdd5fee1edd262 Author: Jeffrey Adamson Date: 2017-01-13T16:16:45Z detect solaris 10 to avoid certain POSIX expressions ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org