2020-06-15 08:08:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
[ -f /.dockerenv ] || { echo "please run in supplied container"; exit 1; }
|
|
|
|
set -e; source environment
|
|
|
|
|
|
|
|
build_dir="${BUILD_DIR?}"
|
|
|
|
buildroot_dir="${build_dir}/buildroot"
|
|
|
|
buildroot_repo="${BUILDROOT_REPO?}"
|
|
|
|
buildroot_ref=${BUILDROOT_REF?}
|
|
|
|
|
|
|
|
[[ -f ~/.gitconfig ]] || \
|
|
|
|
printf "[color]\nui=auto\n[user]\nemail=build@local\nname=Build User" \
|
|
|
|
> ~/.gitconfig
|
|
|
|
|
|
|
|
mkdir -p "$build_dir"
|
2020-06-17 03:29:26 +00:00
|
|
|
|
|
|
|
[ "$(ls -A $build_dir)" ] && exit 0
|
|
|
|
|
2020-06-15 08:08:20 +00:00
|
|
|
git clone "$buildroot_repo" "$buildroot_dir"
|
|
|
|
git -C "$buildroot_dir" checkout "$buildroot_ref"
|
2020-06-15 17:21:28 +00:00
|
|
|
cd "$buildroot_dir"
|
2020-06-17 03:29:26 +00:00
|
|
|
make "airgap_${TARGET}_defconfig"
|
2020-06-15 17:21:28 +00:00
|
|
|
make source
|