-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·75 lines (63 loc) · 1.61 KB
/
build.sh
File metadata and controls
executable file
·75 lines (63 loc) · 1.61 KB
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
#! /usr/bin/bash
echo "Dotnet sdk stage builder"
_root_dir=$PWD
_installer_dir=$_root_dir/installer
_sources_dir=$_root_dir/sources
_dist_dir=$_root_dir/dist
_installer_ver=
_arch=x64
while getopts "a:v:" opt; do
case $opt in
a)
_arch=$OPTARG
;;
v)
_installer_ver=$OPTARG
;;
esac
done
echo "installer version: $_installer_ver"
echo "arch: $_arch"
echo "Root dir: $_root_dir"
echo "Installer dir: $_installer_dir"
echo "Sources dir: $_sources_dir"
echo "Distribution dir: $_dist_dir"
if [ -z $_installer_ver ]; then
echo "-v not set, quitting."
exit 1
fi
if [ -d $_root_dir ]; then
echo "$_root_dir exists"
fi
if [ -d $_installer_dir ]; then
echo "$_installer_dir exists, deleting"
rm -rf $_installer_dir
fi
if [ -d $_sources_dir ]; then
rm -rf $_sources_dir
fi
mkdir -p $_sources_dir
if [ ! -d $_dist_dir ]; then
echo "Making distribution directory"
mkdir -p $_dist_dir
fi
git clone https://github.com/dotnet/installer.git
cd $_installer_dir
git checkout -b "$_installer_ver-local" $_installer_ver
./build.sh -a $_arch \
/p:ArcadeBuildTarball=true \
/p:TarballDir=$_sources_dir
#cd $_source_dir
#_target_name=dotnet-sdk-source-$_installer_ver-$_arch
#_target_tarball=$_dist_dir/$_target_name.tbz
#_target_checksum=$_dist_dir/$_target_name.tbz.sha256
#if [ -d $_target_tarball ]; then
# echo "Clearing file $_target_tarball"
# rm -f $_target_tarball
#fi
#if [ -d $_target_checksum ]; then
# echo "Clearing file $_target_checksum"
# rm -f $_target_checksum
#fi
#tar -cjvf $_target_tarball ./
#sha256sum $_target_tarball > $_target_checksum