I`v a écrit un script, et ont fin de fichier inattenduescript bash, ligne 30: Erreur de syntaxe: fin de fichier inattendue
echo off
if [$JAVA_HOME = ""]; then goto no_java_home fi
if [$SRV_HOME = ""]; then goto no_srv_home fi
echo Uses JAVA_HOME=$JAVA_HOME
echo Uses SRV_HOME=$SRV_HOME
export ACP=""
export ACP=$ACP;$JAVA_HOME/lib/tools.jar
export ACP=$ACP;$SRV_HOME/ant/lib/ant.jar
export ACP=$ACP;$SRV_HOME/ant/lib/ant-launcher.jar
export ACP=$ACP;$SRV_HOME/ant/lib/ant-nodeps.jar
export ACP=$ACP;$SRV_HOME/ant/lib/optional.jar
export ACP=$ACP;$SRV_HOME/ant/lib/ant-contrib-1.0b3.jar
$JAVA_HOME/bin/java -Xmx512m -classpath $ACP org.apache.tools.ant.Main -buildfile $SRV_HOME/ant/ant_script.xml %*
goto ends
no_srv_home:
clear
echo "You should set the TMX_HOME environment variable. For example: TMX_HOME=d:\MYSERVER"
goto ends
no_java_home:
clear
echo "You should set the JAVA_HOME environment variable"
goto ends
ends: echo "OK"
Où est mon problème?
Bash n'a pas 'goto' ou' echo off' et vous devez mettre un espace après '[' et avant ']'. Vous n'avez peut-être pas besoin d'exporter la variable ACP puisqu'elle est passée en argument (Java la recherche-t-elle dans son environnement?). –