1 Star 0 Fork 27

xgdw / Rufus

forked from Gitee 极速下载 / Rufus 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
_detect-amend.sh 773 Bytes
一键复制 编辑 原始数据 按行查看 历史
Pete Batard 提交于 2019-11-19 20:33 . [misc] fix dos_locale.c warning
#!/bin/sh
#
# This script detects whether git commit is being executed in amend or regular mode
# Needed to determine whether the build number should be incremented or not.
#
# Need to figure out if we are running on Windows or *NIX
if [ "$(uname -o)" = "Msys" ]; then
type -P PowerShell &>/dev/null || { echo "PowerShell command not found. Aborting." >&2; exit 1; }
type -P grep &>/dev/null || { echo "grep command not found. Aborting." >&2; exit 1; }
GITCMD=`PowerShell -command "Get-WmiObject win32_process -Filter \"name like '%git.exe'\" | select CommandLine"`
if $(echo $GITCMD | grep -q -- --amend); then
echo AMEND detected
touch ./.amend
fi
else
if $(ps -fp $PPID | grep -q -- --amend); then
echo AMEND detected
touch ./.amend
fi
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/peteray/Rufus.git
git@gitee.com:peteray/Rufus.git
peteray
Rufus
Rufus
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891