aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/BuildIt.sh
blob: 2b12b0a28eef4c1cc1bf38485eb6f808d558e0d8 (plain)
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
#!/bin/bash

# Delete *.pdb, *.dll, *,dll.*, *.csproj, *.csproj.*, */obj/
find -newer lastBuild -name obj -type d -print | xargs /bin/rm -fr
find -newer lastBuild -name *.csproj -type f -print | xargs /bin/rm -f
find -newer lastBuild -name *.csproj.* -type f -print | xargs /bin/rm -f
find -newer lastBuild -name *.dll -type f -print | xargs /bin/rm -f
find -newer lastBuild -name *.dll.* -type f -print | xargs /bin/rm -f
find -newer lastBuild -name *.pdb -type f -print | xargs /bin/rm -f
sleep 1

# Poor mans git sub modules, coz otherwise it gets complex.
if [ ! -d git-sub-modules/opensim-moneymodule-gloebit ]; then
    pushd git-sub-modules
    git clone https://github.com/gloebit/opensim-moneymodule-gloebit.git
    popd
else
    pushd git-sub-modules/opensim-moneymodule-gloebit
    git pull
    popd
fi
rm -rf addon-modules/Gloebit/GloebitMoneyModule
cp -r git-sub-modules/opensim-moneymodule-gloebit/addon-modules/Gloebit/GloebitMoneyModule addon-modules/Gloebit/

touch lastBuild

./runprebuild.sh vs2010

# Prebuild converts Microsoft.CSharp.targets to Microsoft.CSHARP.Targets, which case sensitive file systems fail to find.
find -name *.csproj | xargs sed -i "s@Microsoft.CSHARP.Targets@Microsoft.CSharp.targets@g"

# Debian no longer provides nant.
#./nant-color

if [ "4" == $(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f 1) ]; then
    export XBUILD_COLORS=errors=brightred,warnings=yellow,events=blue
    xbuild /target:clean
    xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5"
else
    # Use this for Mono 5 and later.
    msbuild /p:Configuration=Release
#    msbuild /p:Configuration=Debug
fi


cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin