index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-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 |