We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 912f082 commit 7783fd5Copy full SHA for 7783fd5
build.sh
@@ -2,6 +2,15 @@
2
3
source="${BASH_SOURCE[0]}"
4
5
+function is_cygwin_or_mingw()
6
+{
7
+ case $(uname -s) in
8
+ CYGWIN*) return 0;;
9
+ MINGW*) return 0;;
10
+ *) return 1;;
11
+ esac
12
+}
13
+
14
# resolve $SOURCE until the file is no longer a symlink
15
while [[ -h $source ]]; do
16
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
@@ -13,4 +22,12 @@ while [[ -h $source ]]; do
22
done
23
24
-"$scriptroot/eng/build.sh" $@
25
26
+if is_cygwin_or_mingw; then
27
+ # if bash shell running on Windows (not WSL),
28
+ # pass control to powershell build script.
29
+ scriptroot=$(cygpath -d "$scriptroot")
30
+ powershell -c "$scriptroot\\build.cmd" $@
31
+else
32
+ "$scriptroot/eng/build.sh" $@
33
+fi
0 commit comments