Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit b762958

Browse files
Fixing package.sh to run correctly on bash in windows
1 parent 9e13714 commit b762958

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

package.sh

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,29 @@ pushd src
2222
git clean -xdf
2323
popd
2424

25-
if [ -f "$1/Unity.app/Contents/MacOS/Unity" ]; then
26-
Unity="$1/Unity.app/Contents/MacOS/Unity"
27-
elif [ -f $1/Unity ]; then
28-
Unity="$1/Unity"
29-
else
30-
echo "Can't find Unity in $1"
31-
exit 1
32-
fi
33-
3425
OS="Mac"
3526
if [ -e "/c/" ]; then
3627
OS="Windows"
3728
fi
3829

30+
if [ x"$OS" == x"Windows" ]; then
31+
if [ -f "$1/Editor/Unity.exe" ]; then
32+
Unity="$1/Editor/Unity.exe"
33+
else
34+
echo "Can't find Unity in $1"
35+
exit 1
36+
fi
37+
else
38+
if [ -f "$1/Unity.app/Contents/MacOS/Unity" ]; then
39+
Unity="$1/Unity.app/Contents/MacOS/Unity"
40+
elif [ -f $1/Unity ]; then
41+
Unity="$1/Unity"
42+
else
43+
echo "Can't find Unity in $1"
44+
exit 1
45+
fi
46+
fi
47+
3948
if [ x"$OS" == x"Windows" ]; then
4049
common/nuget restore GitHub.Unity.sln
4150
else

0 commit comments

Comments
 (0)