lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Sekiguchi (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SOLR-2260) syntax error in shell script "abo"
Date Mon, 05 Mar 2012 07:51:03 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Koji Sekiguchi resolved SOLR-2260.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1
                   4.0
         Assignee: Koji Sekiguchi

This one had been resolved at the part of SOLR-2046.
                
> syntax error in shell script "abo"
> ----------------------------------
>
>                 Key: SOLR-2260
>                 URL: https://issues.apache.org/jira/browse/SOLR-2260
>             Project: Solr
>          Issue Type: Sub-task
>    Affects Versions: 1.4, 1.4.1
>            Reporter: Thomas Koch
>            Assignee: Koji Sekiguchi
>             Fix For: 4.0, 3.1
>
>
> The syntax error doesn't effects all shells, on my computer only zsh but not dash or
bash:
> --- src/scripts/abo
> +++ src/scripts/abo
> @@ -175,7 +175,7 @@ trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name}
${data_d
>  
>  # make a backup using hard links into temporary location
>  # then move it into place atomically
> -if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin"  || "${OS}" == "FreeBSD"]]
> +if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin"  || "${OS}" == "FreeBSD" ]]
>  then
>    orig_dir=$(pwd)
>    mkdir ${data_dir}/${temp}
> It's only the space at the end of the if statement. You can check for syntax errors in
shells with
> sh -n $PATH_TO_SCRIPT
> Debian is doing this as part of it's package sanity checks. This is how I found the issue.
If you have multiple shells on your system, you can run this check with all shells:
> zsh -n $PATH_TO_SCRIPT
> dash -n $PATH_TO_SCRIPT
> bash -n $PATH_TO_SCRIPT

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message