I want to write a script which runs some git commands on Windows 7 platform.
The users have git tools installed or at least MINGW - the minimalist GNU for Windows.
The trouble is that some users run from the MINGW32 shell and others from cmd.exe.
Example shell using MINGW32 shell:
$ echo $SHELL
/bin/sh
Example shell using cmd.exe
>echo %COMSPEC%
C:\Windows\system32\cmd.exe
Is there any way I can determine the shell from my initial script and then possibly run a windows batch file or otherwise a unix script?
Or another idea is to assume user will use git bash and just check $SHELL is /bin/sh. Is that easier?