So I'm creating a shell script right, can any of you look through and tell me what's wrong with it?:
in terminal I have this:
Code:
#!/bin/sh
PATH=""
printf "Please specifiy your server's path:"
read PATH
cd $PATH
echo "Your server's path is $PATH"
printf "now please specify an action: compile, run, or both: "
read ACTION
if ( "x$ACTION" == "compile" ) ; then
javac *.java
echo "compiling server..."
else if ( "x$ACTION" == "run" ) ; then
java -Xmx256m server
echo "running server..."
else if ( "x$ACTION" == "both" ) ; then
javac *.java
java -Xmx256m server
echo "compiling and running server..."
else
echo "OH SHI-"
endif
in terminal I have this:
Code:
Please specifiy your server's path:/Server
Your server's path is /Server
now please specify an action: compile, run, or both: compile
./Compiler.sh: line 56: syntax error: unexpected end of file