index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2024-08-16 08:06:08 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2024-08-16 08:06:08 +0200 |
commit | deffc1b87e86fffa8e4758a76a1912c6c8f69a85 (patch) | |
tree | 0f61a152c4c49d40de5042df2b25cdb8e0b0a82d /src/offload-build.in | |
parent | 2994bca96781afd62104c1515532a9c479cb5bed (diff) | |
parent | 27eebe383d0b571c08cba991e4824768d7623602 (diff) |
-rw-r--r-- | src/offload-build.in | 18 |
diff --git a/src/offload-build.in b/src/offload-build.in index 7a8c1fd..f231ed1 100644 --- a/src/offload-build.in +++ b/src/offload-build.in @@ -23,7 +23,7 @@ fi repo=extra arch=x86_64 server=build.archlinux.org -rsyncopts=(-e ssh -c -h -L --progress --partial -y) +rsyncopts=("${RSYNC_OPTS[@]}") usage() { cat <<- _EOF_ @@ -107,6 +107,7 @@ mapfile -t files < <( cd "$temp" && { bsdtar --strip-components 1 -xvf - && + export LOGDEST="" && script -qefc "'"${archbuild_cmd[@]@Q}"'" /dev/null && printf "%s\n" "" "-> build complete" && printf "\t%s\n" "$temp"/* @@ -120,14 +121,25 @@ mapfile -t files < <( [[ -f "${file}" ]] && printf "%s\n" "${file}" ||: done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) && printf "%s\n" "${temp}/PKGBUILD" + + find "${temp}" -name "*.log" ') if (( ${#files[@]} )); then - printf '%s\n' '' '-> copying files...' + msg 'Downloading files...' rsync "${rsyncopts[@]}" "${files[@]/#/$server:}" "${TEMPDIR}/" || die - mv "${TEMPDIR}"/*.pkg.tar* "${PKGDEST:-${PWD}}/" + + if is_globfile "${TEMPDIR}"/*.log; then + mv "${TEMPDIR}"/*.log "${LOGDEST:-${PWD}}/" + fi + # missing PKGBUILD download means the build failed + if [[ ! -f "${TEMPDIR}/PKGBUILD" ]]; then + error "Build failed, check logs in ${LOGDEST:-${PWD}}" + exit 1 + fi mv "${TEMPDIR}/PKGBUILD" "${PWD}/" + mv "${TEMPDIR}"/*.pkg.tar* "${PKGDEST:-${PWD}}/" else exit 1 fi |