Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit db4e36f

Browse files
committed
buildroot/rebuild.sh: Move back to tarball downloads
Rather than have to deal with shallow clones, we can go back to downloading tarballs and using the 'print-version' target to check if we need to download a new tarball. Signed-off-by: Nathan Chancellor <[email protected]>
1 parent c4e7113 commit db4e36f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

buildroot/rebuild.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/usr/bin/env bash
22
# Takes a list of architectures to build images for as the parameter
33

4+
function download_br() {
5+
mkdir -p src
6+
curl https://buildroot.org/downloads/buildroot-"${BUILDROOT_VERSION}".tar.gz | tar -xzf - -C src --strip-components=1
7+
}
8+
49
# Make sure we don't have any unset variables
510
set -u
611

@@ -21,15 +26,14 @@ done
2126
# Download latest buildroot release
2227
BUILDROOT_VERSION=2019.02.3
2328
if [[ -d src ]]; then
24-
cd src || exit 1
25-
if [[ $(git describe --exact-match --tags HEAD) != "${BUILDROOT_VERSION}" ]]; then
26-
git fetch origin ${BUILDROOT_VERSION}
27-
git checkout ${BUILDROOT_VERSION}
29+
if [[ $(cd src && make print-version | cut -d - -f 1 >/dev/null) != "${BUILDROOT_VERSION}" ]]; then
30+
rm -rf src
31+
download_br
2832
fi
2933
else
30-
git clone -b ${BUILDROOT_VERSION} git://git.busybox.net/buildroot src
31-
cd src || exit 1
34+
download_br
3235
fi
36+
cd src || exit 1
3337

3438
# Build the images for the architectures requested
3539
for CONFIG in "${CONFIGS[@]}"; do

0 commit comments

Comments
 (0)