#! /bin/bash

set -e
. ./pika-build-config.sh

### TEMP UNTIL BUILDER IS ADAPTED
if [[ "$PIKA_BUILD_ARCH" == "i386" ]]
then
	export PIKA_BUILD_BUILDSYSTEM="pbuilder"
	#export PIKA_BUILD_BUILDSYSTEM="fetch"
else
	export PIKA_BUILD_BUILDSYSTEM="native"
fi
###

if [[ "$PIKA_BUILD_BUILDSYSTEM" == "pbuilder" ]]
then
	./pbuilder.sh
fi

if [[ "$PIKA_BUILD_BUILDSYSTEM" == "native" ]]
then
	./native.sh
fi

if [[ "$PIKA_BUILD_BUILDSYSTEM" == "fetch" ]]
then
	./fetch.sh
fi