Skip to content

Commit 05a56a2

Browse files
committed
解决windows 下使用git bash 时无法更新问题
1 parent be2ef1d commit 05a56a2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cg

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ esac
2424

2525
# update
2626
do_update () {
27-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/excel-code-generator/code-generator/master/install.sh)"
27+
case "`uname`"
28+
in MINGW*)
29+
powershell "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/excel-code-generator/code-generator/master/install.ps1'))"
30+
;;
31+
*)
32+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/excel-code-generator/code-generator/master/install.sh)"
33+
;;
34+
esac
2835
}
2936

3037
if [ "update" = "$1" ];then

0 commit comments

Comments
 (0)