Created
April 2, 2018 21:04
-
-
Save ianhays/51411d5b7db66f23eb2bd07724eeec0f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env bash | |
# ----------------------------------------------------------------------------------------- | |
# SetupRepos | |
# Arg1 - Origin owner | |
# Arg2 - release version | |
# ----------------------------------------------------------------------------------------- | |
function SetupRepos() { | |
SetupRepo $1 $2 corefx | |
SetupRepo $1 $2 coreclr | |
SetupRepo $1 $2 core-setup | |
SetupRepo $1 $2 buildtools | |
} | |
# ----------------------------------------------------------------------------------------- | |
# SetupRepo | |
# Arg1 - Origin owner | |
# Arg2 - release version | |
# Arg3 - repo name | |
# ----------------------------------------------------------------------------------------- | |
function SetupRepo() { | |
git clone [email protected]:$1/$3.git | |
pushd $3 | |
git remote add upstream [email protected]:dotnet/$3.git | |
git fetch upstream release/$2 | |
git checkout upstream/release/$2 | |
popd | |
} | |
# ----------------------------------------------------------------------------------------- | |
# BuildManaged | |
# Arg1 - | |
# ----------------------------------------------------------------------------------------- | |
function BuildManaged() { | |
pushd corefx | |
./build.sh release | |
popd | |
pushd coreclr | |
./build.sh linuxmscorlib release | |
popd | |
pushd core-setup | |
./build.sh release | |
popd | |
pushd buildtools | |
./build.sh | |
popd | |
} | |
# ----------------------------------------------------------------------------------------- | |
# main | |
# Arg1 - Command to be executed | |
# Args2... args to the specific command to be executed | |
# ----------------------------------------------------------------------------------------- | |
if [ "$1" == "SetupRepos" ]; then | |
SetupRepos $2 $3 | |
elif [ "$1" == "BuildManaged" ]; then | |
BuildManaged | |
else | |
echo "Must provide a command" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment