Windows 下 bat 脚本调用 Git bash 环境 sh 脚本

1、先找到 Git 安装目录

D:\Install\Git


2、Git bash 编写 sh 脚本

start.sh脚本


3、编写 start.bat脚本

bat 复制代码
@echo off

cd /d %~dp0
"D:\Install\Git\bin\sh.exe" --login -i -c "./test/start.sh"

pause

4、执行 bat 脚本

双击 start.bat


我们下期见,拜拜!

相关推荐
Abigail_chow1 小时前
EXCEL如何快速批量给两字姓名中间加空格
windows·microsoft·excel·学习方法·政务
love530love3 小时前
【笔记】在 MSYS2(MINGW64)中正确安装 Rust
运维·开发语言·人工智能·windows·笔记·python·rust
代码搬运媛5 小时前
“packageManager“: “[email protected]“ 配置如何正确启动项目?
windows·webpack
小道士写程序5 小时前
Qt 5.12 上读取 .xlsx 文件(Windows 平台)
开发语言·windows·qt
无聊的小坏坏5 小时前
环境变量深度解析:从配置到内核的全链路指南
linux·bash
司徒小夜6 小时前
处理git没做修改,但是文件显示变更的情况
git
m0_749317527 小时前
vscode里如何用git
ide·git·vscode
Hello.Reader7 小时前
Git 安装全攻略Linux、macOS、Windows 与源码编译
linux·git·macos
王景程8 小时前
SELinux是什么以及如何编写SELinux策略
git·github
Chuncheng's blog8 小时前
如何基于Mihomo Party http端口配置git与bash命令行代理
git·http·bash