How to start. /script.sh in windows git shell?

This may be inconvenient, but I cannot run the .sh file on Windows while working in the Git shell. I probably need to install something, but I thought that Git would support this bash command (I know that Windows does not use sh files).

I do the installation steps from GameClosure , and after $ ./install.sh a window appears with a choice of application to open the sh file (for example, when you try to open an unknown file in Windows, it asks which application should be opened that you would like to use) . I tried to open it using the Git shell, but failed ... What do I need to do to run this file and continue the installation steps from the GameClosure tutorial? **

Here is a screenshot (warning in Polish, but I think you all know this message). Screenshot (Polish)

+6
source share
3 answers

Try using git-bash , available with msysgit , with Git Bash.vbs .

Msysgit is also packaged on GitHub for Windows , although shell is posh-git- based Powershell . This (powershell) explains why *.sh scripts cannot run on it.

OP Szorstki mentions in a comment that there is actually a parameter in the GitHub application for Windows that can configure Git Bash as the default command line tool.

+6
source

Try installing bash for Windows and running script ag again after executing bash from cmd.exe.

+1
source

It calls the correct shell, there are no unnecessary windows and calls a bash script after that, which will be held.

  • Create a shortcut to mintty.exe on the desktop, for example

  • Change label properties and change target (save path):

  • C:\Program Files\Git\usr\bin\mintty.exe" -h always /bin/bash -l -e 'D:\folder\script.sh'

-1
source

Source: https://habr.com/ru/post/945933/


All Articles