[ 
https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15739338#comment-15739338
 ] 

Keegan Witt commented on GROOVY-7906:
-------------------------------------

I'm working on creating some official Groovy Docker images and encountered the 
same issue.  It'd be less intrusive to use Bash just for Groovy, while not 
affecting the rest of the environment.  One way is to just change the shebangs:
{code}
RUN set -ex \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/grape \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovy \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyc \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyConsole \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovydoc \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovysh \
        && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/java2groovy
{code}
I mentioned the idea on the related mailing list 
[discussion|http://groovy.329449.n5.nabble.com/Groovy-Docker-images-td5735270.html].

> groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-7906
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7906
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.7
>         Environment: Alpine linux (=> no bash, busybox only)
>            Reporter: Peter Butkovic
>
> running groovy in alpine linux results in:
> {code}
> /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
> {code}
> as a workaround I'm running:
> {code}
> sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy
> {code}
> prior to invoking groovy



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to