Skip to content

Instantly share code, notes, and snippets.

@SjB
Last active September 8, 2015 18:32
Show Gist options
  • Save SjB/a9a063f20883462f5730 to your computer and use it in GitHub Desktop.
Save SjB/a9a063f20883462f5730 to your computer and use it in GitHub Desktop.
Linux csharp build script
#!/usr/bin/env bash
set -e
set -o pipefail
NUGETURL="http://nuget.org/nuget.exe"
TOOLSDIR=tools
NUGET="$TOOLSDIR/NuGet.exe"
CAKE="$TOOLSDIR/Cake/Cake.exe"
MOZROOTS=`which mozroots`
WGET=`which wget`
if [ ! -d $TOOLSDIR ]; then
mkdir $TOOLSDIR
fi
if [ ! -f $NUGET ]; then
$WGET $NUGETURL -O $NUGET
chmod a+x $NUGET
fi
if [ ! -f $CAKE ]; then
$MOZROOTS --import --sync --quiet
mono $NUGET install Cake -OutputDirectory $TOOLSDIR -ExcludeVersion
fi
mono $CAKE build.cake $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment