index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-05-31 09:25:02 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-05-31 09:32:15 +0200 |
commit | 822d388dca58e4c2bb8308c625406949ad7ffa6e (patch) | |
tree | bc7fdcfa4c3fed27a0f3f68b52ad0da89b051a58 /bin | |
parent | 3ac9afc8b8539a096fb43ef58c8b364461690c83 (diff) |
-rwxr-xr-x | bin/build-packages | 31 |
diff --git a/bin/build-packages b/bin/build-packages index 1788f8b..4320c9f 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -184,14 +184,31 @@ while [ ${count} -ne 0 ]; do fi # maybe a missing source is/was the problem? # try to download them from sources.archlinux.org/sources/$repo/$source - tmp_file="$(mktemp)" - mksrcinfo -o "${tmp_file}" + source_name="$( + makepkg --printsrcinfo | \ + sed -n ' + /^\s*\(epoch\|pkg\(base\|ver\|rel\)\) = /{s|^\s\+||;p} + /^pkgname = /q + ' | \ + sed ' + s|^pkgbase = \(.*\)$|0 \1-| + s|^epoch = \(.*\)$|1 \1:| + s|^pkgver = \(.*\)$|2 \1-| + s|^pkgrel = \(.*\)$|3 \1.src.tar.gz| + ' | \ + sort -k1n,1 | \ + sed ' + s|^[0-9] || + :a + N + s|\n[0-9] || + ta + ' + )" git_repo="$(find_git_repository_to_package_repository "${repository}")" - sed -n '/\s*source = /{s|^\s*source = ||;s|::.*$||;s|^.*/||;p}' "${tmp_file}" | \ - while read -r source_file; do - wget -nc -nd "https://sources.archlinux.org/sources/${git_repo}/${source_file}" || true - done - rm -f "${tmp_file}" + if wget -nc -nd "https://sources.archlinux.org/sources/${git_repo}/${source_name}"; then + tar -xz --overwrite -f "${source_name}" + fi done if ! ${success}; then |