index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-09-11 13:21:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-11 13:21:23 +0200 |
commit | 7ab34eca0722ab510c2c247536d134c02f55e335 (patch) | |
tree | 49212683b9a430f7e52f3960a4f9a24e750eb2e4 /bin/build-packages | |
parent | b711728c0b4953b5cad878b7914f4af69b44c4cb (diff) |
-rwxr-xr-x | bin/build-packages | 19 |
diff --git a/bin/build-packages b/bin/build-packages index a2c98cc..b576138 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -179,13 +179,26 @@ while [ "${count}" -ne 0 ] && \ err=0 if [ -z "${forced_package}" ]; then + case "$(uname -m)" in + 'i486') + arch='i486' + ;; + 'i686'|'x86_64') + arch='i686' + ;; + *) + >&2 printf 'Sorry, architecture %s does not work (yet) as a build slave.\n' \ + "$(uname -m)" + exit 2 + ;; + esac package=$( # shellcheck disable=SC2029 ssh \ -i "${master_build_server_identity}" \ -p "${master_build_server_port}" \ "${master_build_server_user}@${master_build_server}" \ - 'get-assignment' 'i686' "${prefered_package}" + 'get-assignment' "${arch}" "${prefered_package}" ) || err=$? if [ "$(printf '%s\n' "${package}" | wc -l)" -ne 1 ]; then expected_packages=$( @@ -491,7 +504,7 @@ while [ "${count}" -ne 0 ] && \ sed ' s|$|/'"${pkg_file}"'| s/\.[0-9]\+\(-[^-]\+\)$/\1/ - s/-i686\(\.pkg\.tar\.xz\)$/-x86_64\1/ + s/-'"${arch}"'\+\(\.pkg\.tar\.xz\)$/-x86_64\1/ ' | \ while read -r url; do >&2 printf 'downloading "%s" ...' "${url}" @@ -606,7 +619,7 @@ while [ "${count}" -ne 0 ] && \ done find "${tar_content_dir}/" -maxdepth 1 -type f -name '*.pkg.tar.xz-namcap.log' -printf '%f\n' | \ sed ' - s|\(^.*\)-i686\(\.pkg\.tar\.xz-namcap\.log\)$|\0 \1-x86_64\2| + s|\(^.*\)-'"${arch}"'\(\.pkg\.tar\.xz-namcap\.log\)$|\0 \1-x86_64\2| s|^.*-any\.pkg\.tar\.xz-namcap\.log$|\0 \0| ' | \ while read -r log x86_64_log; do |