This repository has been archived by the owner on Mar 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
initializeamend.sh
executable file
·65 lines (57 loc) · 2.91 KB
/
initializeamend.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
#!/bin/bash
# Run from root directory of linux-offline-packaging-msbuild
# Source ./eng/common/tools.sh
echo "- Sourcing ./msbuild/eng/common/tools.sh..."
echo " - . ./msbuild/eng/common/tools.sh"
. ./msbuild/eng/common/tools.sh
# Check for components inside ./offline folder
echo "- Checking ./offline/ folder to see if required components exist..."
# .dotnet
echo " - .dotnet/..."
if [ ! -e "./offline/.dotnet" ]; then
echo " - .dotnet/ not found. creating..."
mkdir "./offline/.dotnet"
fi
# .dotnet/dotnet-install.sh
echo " - .dotnet/dotnet-install.sh"
if [ ! -e "./offline/.dotnet/dotnet-install.sh" ]; then
echo " - .dotnet/dotnet-install.sh not found. downloading..."
wget --continue --output-document="./offline/.dotnet/dotnet-install.sh" "https://dot.net/v1/dotnet-install.sh"
fi
# .dotnet/dep/
echo " - .dotnet/dep/..."
if [ ! -e "./offline/.dotnet/dep/" ]; then
echo " - .dotnet/dep/ not found. creating..."
mkdir "./offline/.dotnet/dep"
fi
# .dotnet/dep/Sdk
echo " - .dotnet/dep/Sdk/..."
if [ ! -e "./offline/.dotnet/dep/Sdk/" ]; then
echo " - .dotnet/dep/Sdk/ not found. creating..."
mkdir "./offline/.dotnet/dep/Sdk"
fi
# .dotnet/dep/Sdk/${dotnet_sdk_version}
ReadGlobalVersion "dotnet"
dotnet_sdk_version=$_ReadGlobalVersion
echo " - .dotnet/dep/Sdk/${dotnet_sdk_version}..."
if [ ! -e "./offline/.dotnet/dep/Sdk/${dotnet_sdk_version}/" ]; then
echo " - .dotnet/dep/Sdk/${dotnet_sdk_version} not found. creating..."
mkdir "./offline/.dotnet/dep/Sdk/${dotnet_sdk_version}"
fi
# Check for required files
echo "- Determining what files to download..."
# .dotnet/dep/Sdk/${dotnet_sdk_version}/dotnet-sdk-${dotnet_sdk_version}-linux-x64.tar.gz
echo " - .dotnet/dep/Sdk/${dotnet_sdk_version}/dotnet-sdk-${dotnet_sdk_version}-linux-x64.tar.gz..."
if [ ! -e "./offline/.dotnet/dep/Sdk/${dotnet_sdk_version}/dotnet-sdk-${dotnet_sdk_version}-linux-x64.tar.gz" ]; then
echo " - dotnet-sdk-${dotnet_sdk_version}-linux-x64.tar.gz not found. downloading..."
wget --continue --output-document="./offline/.dotnet/dep/Sdk/${dotnet_sdk_version}/dotnet-sdk-${dotnet_sdk_version}-linux-x64.tar.gz" "https://dotnetcli.azureedge.net/dotnet/Sdk/${dotnet_sdk_version}/dotnet-sdk-${dotnet_sdk_version}-linux-x64.tar.gz"
fi
# Copy required files from offline to msbuild
echo "- Copying .dotnet..."
echo " - cp -R offline/.dotnet msbuild/"
cp -R offline/.dotnet msbuild/
echo "- Build using \"./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true\" from the \"msbuild\" directory."
echo "- For Launchpad PPAs and general Ubuntu package builds, change \"preview\" in \"debian/changelog\" to \"focal\" or any Ubuntu codename."
echo "- You may want to run \"dch -U\" to sign your custom msbuild package changelog."
echo "- Use \"debuild -S -sa\" to build source package for \"sbuild\"."
echo "- Undo patches once done."