diff --git a/.github/workflows/build-kvx-buildroot.yml b/.github/workflows/build-kvx-buildroot.yml index b333385..fbce322 100644 --- a/.github/workflows/build-kvx-buildroot.yml +++ b/.github/workflows/build-kvx-buildroot.yml @@ -15,4 +15,4 @@ jobs: uses: actions/checkout@v3 - name: Build - run: source last.refs && ./build-kvx-buildroot.sh + run: source last.refs && ./build-kvx-buildroot.sh DO_GIT_ARCHIVE diff --git a/build-kvx-buildroot.sh b/build-kvx-buildroot.sh index 5301763..3e4dbc1 100755 --- a/build-kvx-buildroot.sh +++ b/build-kvx-buildroot.sh @@ -2,11 +2,24 @@ set -eu unset PERL_MM_OPT +DO_GIT_ARCHIVE=$1 + function git_clone() { local repo=$1 local sha1=$2 local branch=$3 + if [[ ! -z "${DO_GIT_ARCHIVE}" ]]; + then + repo_name=${repo##*/} + rm -rf ${repo_name} + wget ${repo}/archive/${sha1}.zip + unzip ${sha1}.zip + rm ${sha1}.zip + mv ${repo_name}-${sha1} ${repo_name} + return + fi + if [[ "${branch}" == "-" ]]; then branch="" @@ -34,7 +47,7 @@ function git_clone() { fi } -git_clone https://github.com/kalray/buildroot.git "${SHA1_BUILDROOT}" main +git_clone https://github.com/kalray/buildroot "${SHA1_BUILDROOT}" main git_clone https://github.com/kalray/linux_coolidge "${SHA1_LINUX}" main git_clone https://github.com/kalray/uclibc-ng "${SHA1_UCLIBC}" main git_clone https://github.com/kalray/musl "${SHA1_MUSL}" main