-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
dotnet-local
script to work from any directory. (#6884)
The current `docnet-local` scripts relied on being run from the same directory. This change uses the script location to run the exists checks and to execute the `dotnet` binary. This way we can run this from any directory.
- Loading branch information
1 parent
7982895
commit b7db52b
Showing
2 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
@echo off | ||
|
||
IF EXIST "bin\Release\dotnet\dotnet.exe" ( | ||
call "bin\Release\dotnet\dotnet.exe" %* | ||
) ELSE IF EXIST "bin\Debug\dotnet\dotnet.exe" ( | ||
call "bin\Debug\dotnet\dotnet.exe" %* | ||
SET ROOT=%~dp0 | ||
IF EXIST "%ROOT%\bin\Release\dotnet\dotnet.exe" ( | ||
call "%ROOT%\bin\Release\dotnet\dotnet.exe" %* | ||
) ELSE IF EXIST "%ROOT%\bin\Debug\dotnet\dotnet.exe" ( | ||
call "%ROOT%\bin\Debug\dotnet\dotnet.exe" %* | ||
) ELSE ( | ||
echo "You need to run 'msbuild Xamarin.Android.sln /t:Prepare' first." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#!/bin/bash | ||
if [[ -x "bin/Release/dotnet/dotnet" ]]; then | ||
exec ./bin/Release/dotnet/dotnet "$@" | ||
elif [[ -x "bin/Debug/dotnet/dotnet" ]]; then | ||
exec ./bin/Debug/dotnet/dotnet "$@" | ||
ROOT=$(dirname "${BASH_SOURCE}") | ||
if [[ -x "${ROOT}/bin/Release/dotnet/dotnet" ]]; then | ||
exec ${ROOT}/bin/Release/dotnet/dotnet "$@" | ||
elif [[ -x "${ROOT}/bin/Debug/dotnet/dotnet" ]]; then | ||
exec ${ROOT}/bin/Debug/dotnet/dotnet "$@" | ||
else | ||
echo "You need to run 'make prepare' first." | ||
fi |