forked from UraniumDonut/nbfc-revive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·42 lines (30 loc) · 936 Bytes
/
build.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
#!/bin/bash
NUGET_URL="https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
function download-nuget {
curl -O $NUGET_URL
# import Mozilla trusted root certificates into mono certificates store
# Debian / Ubuntu / Arch
cert-sync "/etc/ssl/certs/ca-certificates.crt"
# Fedora / CentOS
cert-sync "/etc/pki/tls/certs/ca-bundle.crt"
}
pushd $(dirname "${0}")
# download nuget if necessary
if [ ! -f ./nuget.exe ]
then
echo "NuGet could not be found. Downloading latest recommended version."
download-nuget
fi
mono nuget.exe restore
# restore nuget packages for solution
if [ "$?" != 0 ]
then
echo "Packages could not be restored. Updating NuGet."
rm ./nuget.exe
download-nuget
mono nuget.exe restore
fi
# build solution
xbuild /t:Clean /p:Configuration=ReleaseLinux NoteBookFanControl.sln
xbuild /t:Build /p:Configuration=ReleaseLinux NoteBookFanControl.sln
popd