?
Solved

batch to .sh

Posted on 2009-05-12
1
Medium Priority
?
335 Views
Last Modified: 2013-12-27
I have a Windows batch file which I need to execute on Solaris. I am trying to convert it to .sh since batch does not execute on Solaris

Here is the windows file

--------
echo off
setlocal
set ECLIPSE="C:\Composer"
set BUILDWORKSPACE="C:\Composer\build_workspace"
set BUILDFILE="R:\Smart_Container\Main\buildEnv\DARBuild.xml"
set INSTALLFILE="R:\Smart_Container\Main\buildEnv\DARInstall.xml"
set DARPROJECTSDIR="R:\Smart_Container\Main\darProjects"
set INSTALLWORKSPACE="c:\Composer\install_workspace"
rmdir /S /Q %BUILDWORKSPACE%
rmdir /S /Q %INSTALLWORKSPACE%
xcopy %DARPROJECTSDIR% %BUILDWORKSPACE% /E /I
java cp
%ECLIPSE%\startup.jar org.eclipse.core.launcher.Main
data
%BUILDWORKSPACE% application
org.eclipse.ant.core.antRunner
buildfile
%BUILDFILE%
java cp
%ECLIPSE%\startup.jar org.eclipse.core.launcher.Main
data
%INSTALLWORKSPACE% application
org.eclipse.ant.core.antRunner
buildfile
%INSTALLFILE%
--------

I have done the following in .sh

--------------
echo off
setlocal
set ECLIPSE="/Composer"
set BUILDWORKSPACE="/Composer/build_workspace"
set BUILDFILE="/usr/local/Smart_Container/Main/buildEnv/DARBuild.xml"
set INSTALLFILE="/usr/local/Smart_Container/Main/buildEnv/DARInstall.xml"
set DARPROJECTSDIR="/usr/local/Smart_Container/Main/darProjects"
set INSTALLWORKSPACE="/Composer/install_workspace"
rmdir /S /Q $BUILDWORKSPACE
rmdir /S /Q $INSTALLWORKSPACE
xcopy $DARPROJECTSDIR $BUILDWORKSPACE /E /I
java cp
$ECLIPSE/startup.jar org.eclipse.core.launcher.Main
data
$BUILDWORKSPACE application
org.eclipse.ant.core.antRunner
buildfile
$BUILDFILE
java cp
$ECLIPSE/startup.jar org.eclipse.core.launcher.Main
data
$INSTALLWORKSPACE application
org.eclipse.ant.core.antRunner
buildfile
$INSTALLFILE
--------------

But does not seem to be working. Can someone please help.
Thank you
0
Comment
Question by:anshul9189
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 24363201
This should get you a little closer.
#!/bin/sh
ECLIPSE=/Composer
BUILDWORKSPACE=/Composer/build_workspace
BUILDFILE=/usr/local/Smart_Container/Main/buildEnv/DARBuild.xml
INSTALLFILE=/usr/local/Smart_Container/Main/buildEnv/DARInstall.xml
DARPROJECTSDIR=/usr/local/Smart_Container/Main/darProjects
INSTALLWORKSPACE=/Composer/install_workspace
 
rm -fr $BUILDWORKSPACE
rm -fr $INSTALLWORKSPACE
 
cp -rp $DARPROJECTSDIR $BUILDWORKSPACE
 
# Not sure about your java stuff
java cp
$ECLIPSE/startup.jar org.eclipse.core.launcher.Main
data
$BUILDWORKSPACE application
org.eclipse.ant.core.antRunner
buildfile
$BUILDFILE
java cp
$ECLIPSE/startup.jar org.eclipse.core.launcher.Main
data
$INSTALLWORKSPACE application
org.eclipse.ant.core.antRunner
buildfile
$INSTALLFILE

Open in new window

0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question