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, 1.4
Reporter: Thomas Koch
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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]