-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_packages.sh
69 lines (59 loc) · 1.77 KB
/
install_packages.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
#!/usr/bin/env bash
#
# Generated by: https://github.com/openapitools/openapi-generator.git
#
frameworkVersion=netstandard2.0
# sdk must match installed framworks under PREFIX/lib/mono/[value]
sdk=4.6-api
# langversion refers to C# language features. see man mcs for details.
langversion=${sdk}
nuget_cmd=nuget
# Match against our known SDK possibilities
case "${sdk}" in
4)
langversion=4
;;
4.5*)
langversion=5
;;
4.6*)
langversion=6
;;
4.7*)
langversion=7 # ignoring 7.1 for now.
;;
*)
langversion=6
;;
esac
echo "[INFO] Target framework: ${frameworkVersion}"
if ! type nuget &>/dev/null; then
echo "[INFO] Download nuget and packages"
wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe;
nuget_cmd="mono nuget.exe"
fi
mozroots --import --sync
${nuget_cmd} install src/DocSpring.Client/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
cp packages/Newtonsoft.Json.10.0.3/lib/netstandard2.0/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/netstandard2.0/RestSharp.dll bin/RestSharp.dll;
cp packages/JsonSubTypes.1.2.0/lib/netstandard2.0/JsonSubTypes.dll bin/JsonSubTypes.dll
# echo "[INFO] Run 'mcs' to build bin/DocSpring.Client.dll"
# mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
#
# bin/RestSharp.dll,\
# System.ComponentModel.DataAnnotations.dll,\
# System.Runtime.Serialization.dll \
# -target:library \
# -out:bin/DocSpring.Client.dll \
# -recurse:'src/DocSpring.Client/*.cs' \
# -doc:bin/DocSpring.Client.xml \
# -platform:anycpu
# if [ $? -ne 0 ]
# then
# echo "[ERROR] Compilation failed with exit code $?"
# exit 1
# else
# echo "[INFO] bin/DocSpring.Client.dll was created successfully"
# fi