You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Keegan Witt (JIRA)" <ji...@apache.org> on 2016/12/11 10:57:58 UTC

[jira] [Comment Edited] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution

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

Keegan Witt edited comment on GROOVY-7906 at 12/11/16 10:57 AM:
----------------------------------------------------------------

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 "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/grape \
	&& sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovy \
	&& sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyc \
	&& sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyConsole \
	&& sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovydoc \
	&& sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovysh \
	&& sed -i "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].


was (Author: keegan):
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)