#!/bin/bash
if [ "$(ls -F $WORKDIR | grep \/$ | wc -l)" == "1" ] ; then
	export WORKDIR="$WORKDIR/$(ls -F $WORKDIR | grep \/$)"
fi
info "Single source detected: new workdir => $WORKDIR"
if [ "$BuildType" != "" ] ; then
	info "Build Type found."
elif [ -f "$WORKDIR/meson.build" ] ; then
	BuildType="meson"
elif [ -f "$WORKDIR/CMakeLists.txt" ] ; then
	BuildType="cmake"
elif [ -f "$WORKDIR/setup.py" ] ; then
	BuildType="python"
elif [ -f "$WORKDIR/configure" ] ; then
	BuildType="autotools"
fi
