-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.sh
executable file
·77 lines (55 loc) · 2.77 KB
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
SDKBIN="https://github.com/sec/dotnet-core-freebsd-source-build/releases/download/8.0.100-x64-native/dotnet-sdk-8.0.100-freebsd-x64.tar.gz"
SDKZIP="sdk.tgz"
if [ `uname -m` = 'arm64' ]; then
SDKBIN="https://github.com/sec/dotnet-core-freebsd-source-build/releases/download/8.0.100-arm64-native/dotnet-sdk-8.0.100-freebsd-arm64.tar.gz"
fi
RUNTIMETAG=`cat runtime.tag`
ASPNETCORETAG=`cat aspnetcore.tag`
INSTALLERTAG=`cat installer.tag`
SDKTAG=`cat sdk.tag`
#needed for openjdk
#mount -t fdescfs fdesc /dev/fd
#mount -t procfs proc /proc
if [ ! -f $SDKZIP ]; then
echo "Downloading SDK for FreeBSD"
fetch $SDKBIN --quiet -o $SDKZIP
fi
if [ ! -d runtime ]; then
git clone https://github.com/dotnet/runtime.git
git -C runtime checkout $RUNTIMETAG
./bsd_dotnet_install.sh $SDKZIP runtime
runtime/.dotnet/dotnet nuget add source 'https://fbsdnugetfeed.mooo.com/v3/index.json' --name ghsec --configfile runtime/NuGet.config
if [ -f local.nuget ]; then
runtime/.dotnet/dotnet nuget add source `cat local.nuget` --name localdir --configfile runtime/NuGet.config
fi
patch -d runtime < patches8/runtime_8.0.0.patch
fi
if [ ! -d aspnetcore ]; then
git clone https://github.com/dotnet/aspnetcore.git
git -C aspnetcore checkout $ASPNETCORETAG
git -C aspnetcore submodule update --init
./bsd_dotnet_install.sh $SDKZIP aspnetcore
aspnetcore/.dotnet/dotnet nuget add source ../runtime/artifacts/packages/Release/Shipping/ --name local --configfile aspnetcore/NuGet.config
aspnetcore/.dotnet/dotnet nuget add source 'https://fbsdnugetfeed.mooo.com/v3/index.json' --name ghsec --configfile aspnetcore/NuGet.config
patch -d aspnetcore < patches8/aspnetcore_preview1.patch
cp patches/aspnet.editorconfig aspnetcore/src/.editorconfig
if [ -f local.nuget ]; then
aspnetcore/.dotnet/dotnet nuget add source `cat local.nuget` --name localdir --configfile aspnetcore/NuGet.config
fi
fi
if [ ! -d installer ]; then
git clone https://github.com/dotnet/installer.git
git -C installer checkout $INSTALLERTAG
./bsd_dotnet_install.sh $SDKZIP installer
installer/.dotnet/dotnet nuget add source ../runtime/artifacts/packages/Release/Shipping/ --name local1 --configfile installer/NuGet.config
installer/.dotnet/dotnet nuget add source ../aspnetcore/artifacts/packages/Release/Shipping/ --name local2 --configfile installer/NuGet.config
patch -d installer < patches8/installer_preview7.patch
fi
if [ ! -d sdk ]; then
git clone https://github.com/dotnet/sdk
git -C sdk checkout $SDKTAG
./bsd_dotnet_install.sh $SDKZIP sdk
patch -d sdk < patches8/sdk_preview1.patch
sdk/.dotnet/dotnet nuget add source 'https://fbsdnugetfeed.mooo.com/v3/index.json' --name ghsec --configfile sdk/NuGet.config
fi