convert bat to sh

Posted by Cris on Server Fault See other posts from Server Fault or by Cris
Published on 2011-06-24T22:10:20Z Indexed on 2011/06/25 0:24 UTC
Read the original article Hit count: 589

Filed under:
|
|

I am totally new to scripting in linux...so i want to port some simple window bat files to ubuntu.

First file is easy

  setenv.bat
    set ANT_HOME=c:\ant\apache-ant-1.7.1
    set JAVA_HOME=c:\java

in linux i did this and it seems ok

  setenv.sh
      #!/bin/bash
    JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/
    ANT_HOME=/usr/share/ant
    echo $JAVA_HOME
    echo $ANT_HOME

but now i want to port this bat file: startserver.bat

call ../config/setenv

call %ANT_HOME%/bin/ant -f ../config/common.xml start_db
call %ANT_HOME%/bin/ant -f ../config/common.xml start_server


pause

but i have no clue how can i do this in linux call ../config/setenv

thank you for any help , direction given.

© Server Fault or respective owner

Related posts about Windows

Related posts about ubuntu