2015-10-11 06:57:20 +03:00
|
|
|
#!/usr/bin/env bash
|
2014-07-03 08:57:49 +04:00
|
|
|
|
|
|
|
if test `uname` = Darwin; then
|
|
|
|
cachedir=~/Library/Caches/KBuild
|
|
|
|
else
|
|
|
|
if [ -z $XDG_DATA_HOME ]; then
|
|
|
|
cachedir=$HOME/.local/share
|
|
|
|
else
|
|
|
|
cachedir=$XDG_DATA_HOME;
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
mkdir -p $cachedir
|
2015-10-11 06:57:20 +03:00
|
|
|
nugetVersion=latest
|
|
|
|
cachePath=$cachedir/nuget.$nugetVersion.exe
|
2014-07-03 08:57:49 +04:00
|
|
|
|
2015-10-11 06:57:20 +03:00
|
|
|
url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
|
2014-07-03 08:57:49 +04:00
|
|
|
|
2015-10-11 06:57:20 +03:00
|
|
|
if test ! -f $cachePath; then
|
|
|
|
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
|
2014-07-03 08:57:49 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test ! -e .nuget; then
|
|
|
|
mkdir .nuget
|
2015-10-11 06:57:20 +03:00
|
|
|
cp $cachePath .nuget/nuget.exe
|
2014-07-03 08:57:49 +04:00
|
|
|
fi
|
|
|
|
|
2015-10-11 06:57:20 +03:00
|
|
|
if test ! -d packages/Sake; then
|
2014-07-03 08:57:49 +04:00
|
|
|
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
2015-09-10 01:26:03 +03:00
|
|
|
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
|
2014-07-03 08:57:49 +04:00
|
|
|
fi
|
|
|
|
|
2015-01-08 22:34:04 +03:00
|
|
|
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -I build -f makefile.shade "$@"
|