#! /bin/bash -ex

#####################
# Configuration     # 							     
#####################

### Sources
UBOOT_VERSION="< uboot-version >"
UBOOT_CONFIG="< def-config >"
SRC_DIR="src"
FIRMWARE_IMG="u-boot.bin"

#####################
# Script            #
#####################

git clone -b ${UBOOT_VERSION} --depth 1 --single-branch $(git remote -v | sed -n '/.git/{p;q;}' | awk '{print $(NF-1)}') ${SRC_DIR} && . ${SRC_DIR}/build

build
