summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-10-04 21:41:41 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-10-04 22:04:41 -0400
commit543cf0ace79d1e9dcd4c979ba3e63bf785ff36c3 (patch)
tree24ea99893964c2e6af7a1ef292e76ac34655615f
parentf6ad71e7f5f3e129f63dfe224277b5a2049a5817 (diff)
db-import-any: Fixparabola/20181005
-rwxr-xr-xdb-import-any8
1 files changed, 5 insertions, 3 deletions
diff --git a/db-import-any b/db-import-any
index ab7bfca..7827443 100755
--- a/db-import-any
+++ b/db-import-any
@@ -45,17 +45,19 @@ main() {
local repo arch
for repo in "${PKGREPOS[@]}"; do
msg "Processing %s..." "${repo}"
+ mkdir -p -- "${WORKDIR}/staging/${repo}"
# Look for arch=(any) packages that exist in
# ${BASEARCH} for this repo but is missing from one or
# more of ${ARCHES[@]}.
+ db_list_any_pkgfiles "${FTP_BASE}/${repo}/os/${BASEARCH}/${repo}.db" > "${WORKDIR}/base.txt"
for arch in "${ARCHES[@]}"; do
[[ $arch != "$BASEARCH" ]] || continue
- comm -23 \
- <(db_list_any_pkgfiles "${FTP_BASE}/${repo}/os/${BASEARCH}/${repo}.db") \
- <(db_list_any_pkgfiles "${FTP_BASE}/${repo}/os/${arch}/${repo}.db")
+ db_list_any_pkgfiles "${FTP_BASE}/${repo}/os/${arch}/${repo}.db" > "${WORKDIR}/arch.txt"
+ comm -23 "${WORKDIR}/base.txt" "${WORKDIR}/arch.txt"
done \
| sort -u \
| xargs -d '\n' -r -n1 -- printf '%s/%s\n' "${FTP_BASE}/${repo}/os/${BASEARCH}" \
+ | sed 's/.*/&\n&.sig/' \
| xargs -d '\n' -r -- ln -srv -t "${WORKDIR}/staging/${repo}" --
done