You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
892 B
35 lines
892 B
#!/usr/bin/env bash
|
|
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
cd $repoFolder
|
|
|
|
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/release.zip"
|
|
if [ ! -z $KOREBUILD_ZIP ]; then
|
|
koreBuildZip=$KOREBUILD_ZIP
|
|
fi
|
|
|
|
buildFolder=".build"
|
|
buildFile="$buildFolder/KoreBuild.sh"
|
|
|
|
if test ! -d $buildFolder; then
|
|
echo "Downloading KoreBuild from $koreBuildZip"
|
|
|
|
tempFolder="/tmp/KoreBuild-$(uuidgen)"
|
|
mkdir $tempFolder
|
|
|
|
localZipFile="$tempFolder/korebuild.zip"
|
|
|
|
wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip /dev/null
|
|
unzip -q -d $tempFolder $localZipFile
|
|
|
|
mkdir $buildFolder
|
|
cp -r $tempFolder/**/build/** $buildFolder
|
|
|
|
chmod +x $buildFile
|
|
|
|
# Cleanup
|
|
if test ! -d $tempFolder; then
|
|
rm -rf $tempFolder
|
|
fi
|
|
fi
|
|
|
|
$buildFile -r $repoFolder "$@"
|