#3661: Version.sh might not run on platforms where /bin/sh is not bash
----------------------+----------------------
  Reporter:  marcusk  |      Owner:  mutt-dev
      Type:  defect   |     Status:  new
  Priority:  major    |  Milestone:
 Component:  build    |    Version:  1.5.22
Resolution:           |   Keywords:  patch
----------------------+----------------------

Comment (by aaron@…):

 {{{
 At 06:48 -0000 22 Oct 2013, Mutt <[email protected]> wrote:

 The only construct I see in there that I can think might cause a problem
 is one use of $() rather than backticks.  That's in POSIX, so definitely
 not a bash-only thing.  But, that one use isn't really made any less
 clear by using backticks, so it doesn't really hurt to try to support
 systems with a /bin/sh that isn't up to date with recent versions of the
 POSIX specs.

 Does the following patch fix things for you?


 diff --git i/version.sh w/version.sh
 index ba8463b..d7988df 100644
 --- i/version.sh
 +++ w/version.sh
 @@ -5,7 +5,7 @@ HG=hg
  # Switch to directory where this script lives so that further commands
 are run
  # from the root directory of the source.  The script path and srcdir are
 double
  # quoted to allow the space character to appear in the path.
 -srcdir=$(dirname "$0") && cd "$srcdir" || exit 1
 +srcdir=`dirname "$0"` && cd "$srcdir" || exit 1

  # Ensure that we have a repo here and that mercurial is installed.  If
  # not, just cat the VERSION file; it contains the latest release number.
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3661#comment:2>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to