2014-10-22 01:35:09 +04:00
|
|
|
#!/bin/bash
|
2014-05-23 14:15:48 +04:00
|
|
|
|
|
|
|
if test `uname` = Darwin; then
|
|
|
|
cachedir=~/Library/Caches/KBuild
|
|
|
|
else
|
2014-06-11 04:09:36 +04:00
|
|
|
if [ -z $XDG_DATA_HOME ]; then
|
|
|
|
cachedir=$HOME/.local/share
|
2014-05-23 14:15:48 +04:00
|
|
|
else
|
2014-06-11 04:09:36 +04:00
|
|
|
cachedir=$XDG_DATA_HOME;
|
2014-05-23 14:15:48 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
mkdir -p $cachedir
|
|
|
|
|
|
|
|
url=https://www.nuget.org/nuget.exe
|
|
|
|
|
|
|
|
if test ! -f $cachedir/nuget.exe; then
|
2014-06-11 04:09:36 +04:00
|
|
|
wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null
|
2014-05-23 14:15:48 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test ! -e .nuget; then
|
|
|
|
mkdir .nuget
|
2014-06-11 04:09:36 +04:00
|
|
|
cp $cachedir/nuget.exe .nuget/nuget.exe
|
2014-05-23 14:15:48 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test ! -d packages/KoreBuild; then
|
|
|
|
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
|
|
|
mono .nuget/nuget.exe install Sake -version 0.2 -o packages -ExcludeVersion
|
|
|
|
fi
|
|
|
|
|
2015-03-25 03:34:51 +03:00
|
|
|
if ! type dnvm > /dev/null 2>&1; then
|
2015-03-07 21:43:10 +03:00
|
|
|
source packages/KoreBuild/build/dnvm.sh
|
2015-01-20 11:29:57 +03:00
|
|
|
fi
|
|
|
|
|
2015-03-25 03:34:51 +03:00
|
|
|
if ! type dnx > /dev/null 2>&1; then
|
2015-03-07 21:43:10 +03:00
|
|
|
dnvm upgrade
|
2015-01-20 11:29:57 +03:00
|
|
|
fi
|
2014-10-22 01:26:56 +04:00
|
|
|
|
2014-06-11 04:09:36 +04:00
|
|
|
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"
|