[Dune] DUNE Installation

Jö Fahlke jorrit at jorrit.de
Thu Oct 12 11:51:36 CEST 2006


Am Wed, 11. Oct 2006, 18:29:59 +0200 schrieb Christian Engwer:
> On Wed, Oct 11, 2006 at 04:44:13PM +0200, Matthias Läuter wrote:
> > ./dune-common/bin/dunecontrol: syntax error at line 18: `(' unexpected
> > bleibt mir erhalten, wenn ich die sh nutze.
> 
> Was fuer 'ne sh benutzt du denn? Es scheint so, als ob deine sh keine
> subshells mag, aber auf dem solaris bei uns ging _das_ ohne
> probleme. Es gibt auch bei gnu.org eine uebersicht ueber die
> Spezialitaeten der verschiedenen shs, von Problemen mit subshells war
> da nicht die Rede.

Wahrscheinlich stört sich die Sun-sh an $(...) in der folgenden Zeile:

  (cd $(dirname $(canonicalname $1)) && pwd)

Vermutlich macht man das am besten mit ``, in zwei Stufen, etwa so:

  ( hurz=`canonicalname "$1"`; cd `dirname "$hurz"` && pwd )

Von
http://www.gnu.org/software/autoconf/manual/html_node/Shell-Substitutions.html#Shell-Substitutions

======================================================================

$(commands)
    This construct is meant to replace ‘`commands`’, and it has most
    of the problems listed under `commands`.

    This construct can be nested while this is impossible to do
    portably with back quotes. Unfortunately it is not yet universally
    supported. Most notably, even recent releases of Solaris don't
    support it:

              $ showrev -c /bin/sh | grep version
              Command version: SunOS 5.10 Generic 121004-01 Oct 2005
              $ echo $(echo blah)
              syntax error: `(' unexpected

    nor does irix 6.5's Bourne shell:

              $ uname -a
              IRIX firebird-image 6.5 07151432 IP22
              $ echo $(echo blah)
              $(echo blah)

    If you do use ‘$(commands)’, make sure that the commands do not
    start with a parenthesis, as that would cause confusion with a
    different notation ‘$((expression))’ that in modern shells is an
    arithmetic expression not a command. To avoid the confusion,
    insert a space between the two opening parentheses.

    Avoid commands that contain unbalanced parentheses in
    here-documents, comments, or case statement patterns, as many
    shells mishandle them. For example, Bash 3.1, ‘ksh88’, pdksh
    5.2.14, and Zsh 4.2.6 all mishandle the following valid command:

              echo $(case x in x) echo hello;; esac)

======================================================================


-- 
Of all the things I've lost, I miss my mind the most.
-- Ozzy Osbourne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20061012/648ca71c/attachment.sig>


More information about the Dune mailing list