-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4c2721
commit a3e453d
Showing
5 changed files
with
64 additions
and
1 deletion.
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
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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
function write_error { | ||
echo "error(1): $1" 2>&1 | ||
exit 1 | ||
} | ||
|
||
function guard_bin { | ||
builtin type -P "$1" &>/dev/null || write_error "Could not find '$1'; $2" | ||
} | ||
|
||
guard_bin git "please install the Git CLI from https://git-scm.com/" | ||
guard_bin dotnet "please install the .NET SDK from https://dot.net/" | ||
|
||
if [ `uname -o` = Msys ]; then | ||
guard_bin msbuild.exe "please run this from a Visual Studio developer shell" | ||
else | ||
guard_bin mono "please install Mono from https://www.mono-project.com/" | ||
fi | ||
|
||
[ $(dotnet --version | cut -d. -f1) -ge 8 ] || write_error ".NET SDK version $(dotnet --version) is too low; please install version 8.0 or later from https://dot.net/" | ||
|
||
git submodule status | while read line; do | ||
if [ "$(echo $line | cut -b1)" == "-" ]; then | ||
pieces=( $line ) | ||
git submodule update --init ${pieces[1]} | ||
echo "" | ||
fi | ||
done | ||
|
||
PUSHED=0 | ||
|
||
cleanup () { | ||
if [[ $PUSHED == 1 ]]; then | ||
popd >/dev/null | ||
PUSHED=0 | ||
fi | ||
} | ||
|
||
trap cleanup EXIT ERR INT TERM | ||
|
||
pushd $( cd "$(dirname "$0")" ; pwd -P ) >/dev/null | ||
PUSHED=1 | ||
|
||
dotnet run --project tools/builder --no-launch-profile -- "$@" |
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
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