[Wine] Running bash script from batch file

cpicds wineforum-user at winehq.org
Tue Nov 29 03:53:07 CST 2011

I am using the Keil uVision IDE under Wine. This has the option to run a user-specified batch file for special compilations. The batch file I have written determines whether it is running under Windows or Linux and, in the latter case, runs a shell script to perform the required action. (The shell script simply converts the file names from DOS to Linux and runs the same Java program to perform the work.)

This used to work. However, when I recreated by source tree anew from the VCS, it stopped working. The failure appears to be that it cannot find the shell script. (Both the batch file and the shell script have the executable flag set.) Adding debug output to the batch file shows that it is finding the shell script, but it still reports "file not found" when trying to execute it. (I have checked that the path has exactly the same case as the command.)


@echo off
REM SHELL is defined under Wine, but not under Windows

if not "%SHELL%"=="" (
	echo "Linux"
	if exist ../utilities/h86crc/bin/javacrc.sh (
		echo "javacrc.sh exists"
		../utilities/h86crc/bin/javacrc.sh %1 %2 %3 %4
	) else (
		echo "javacrc.sh not found"
) else (
	echo "Windows"
	java %1 %2 %3 %4

The output is:

User command #1: ..\utilities\h86crc\bin\javacrc.bat -jar ..\utilities\h86crc\bin\H86CRC.jar -m:1024 H:\projects\atlasxml\AtlasMV\Bin\AtlasMV_NRIM01.H86
"javacrc.sh exists"
File not found

The first line of the shell script is an echo command and this does not appear.

Any help in resolving this would be very much appreciated.


More information about the wine-users mailing list