简体   繁体   中英

How to run ./script.sh in windows Git shell?

Maybe it's awkward, but I can't run .sh file on Windows when working in Git shell. Probably I have to install something, but I thought that Git will support that bash command (I know Windows don't use sh files).

I am doing installation steps from GameClosure and after $ ./install.sh a window with application selection to open sh file appears (like that when you try to open unknown file in Windows, it asks what application to open this you would like to use). I've tried open it with Git shell, but failed... What I have to do to run this file and proceed with installation steps from GameClosure tutorial?**

Here is a screenshot (alert in polish, but I think you all know this message). 截图(波兰语)

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

Msysgit is also packaged within GitHub for Windows , even though the shell exposed is a Powershell one based on posh-git . That (powershell) would explain why *.sh scripts cannot run on it.

The OP Szorstki mentions in the comment that there actually is a setting in the GitHub for Windows app, that can set up Git Bash as the default command line tool.

尝试安装bash for Windows并在从cmd.exe执行bash后再次运行脚本ag。

Invokes the right shell, no unnecessary windows and invokes a bash script afterwards which will be hold.

  • Create a Shortcut to mintty.exe on your desktop, for example

  • Edit properties of the shortcut and change the target (keep the path):

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM