bootstrap
This commit is contained in:
parent
aa989f1e6e
commit
04adb5ef56
2 changed files with 19 additions and 1 deletions
|
@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
[Target(nameof(MsiTargets.GenerateMsis),
|
||||
nameof(MsiTargets.GenerateBundle),
|
||||
nameof(PkgTargets.GeneratePkgs)]//,
|
||||
nameof(PkgTargets.GeneratePkgs))]//,
|
||||
//nameof(InstallerTargets.GenerateDebs))]
|
||||
public static BuildTargetResult GenerateInstaller(BuildTargetContext c)
|
||||
{
|
||||
|
|
|
@ -99,6 +99,16 @@ make_link() {
|
|||
ln -s $src $dest
|
||||
}
|
||||
|
||||
make_bootstrap_link() {
|
||||
local src=$INSTALLDIR/cli/bin/dotnet
|
||||
local dest=$INSTALLDIR/cli/dotnet
|
||||
say "Linking $dest -> $src"
|
||||
if [ -e $dest ]; then
|
||||
rm $dest
|
||||
fi
|
||||
ln -s $src $dest
|
||||
}
|
||||
|
||||
install_dotnet()
|
||||
{
|
||||
if ! machine_has "curl"; then
|
||||
|
@ -130,6 +140,10 @@ install_dotnet()
|
|||
local installLocation="$INSTALLDIR"
|
||||
local dotnet_url="https://dotnetcli.blob.core.windows.net/dotnet/$CHANNEL/Binaries/$VERSION"
|
||||
local dotnet_filename="dotnet-dev-$os-x64.$fileVersion.tar.gz"
|
||||
|
||||
if [ "$os" = "ubuntu" ]; then
|
||||
dotnet_filename="dotnet-$os-x64.$fileVersion.tar.gz"
|
||||
fi
|
||||
|
||||
if [ "$RELINK" = "0" ]; then
|
||||
if [ "$FORCE" = "0" ]; then
|
||||
|
@ -178,6 +192,10 @@ install_dotnet()
|
|||
[ $? != 0 ] && say_err "Failed to clean current dotnet install" && return 1
|
||||
|
||||
mv "$installLocation/cli_new" "$installLocation/cli"
|
||||
|
||||
if [ "$os" = "ubuntu" ]; then
|
||||
make_bootstrap_link
|
||||
fi
|
||||
elif [ ! -e "$installLocation/cli" ]; then
|
||||
say_err "${red}cannot relink dotnet, it is not installed in $PREFIX!"
|
||||
return 1
|
||||
|
|
Loading…
Add table
Reference in a new issue