diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-24 22:51:14 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-24 22:51:14 -0400 |
commit | 8e670c23359134af39b1c97173895c09948c2acb (patch) | |
tree | 3ada5096faa3f347a698b2e8e5008271b3c2e234 | |
parent | 5137df3e0e41abdcacc9f55ca40880de045fdbce (diff) |
db-update: get the list of repos the same way as upstream Arch
The largest advantage of this is that it implicitly ignores directories we
don't want to consider repos.
-rw-r--r-- | config | 2 | ||||
-rwxr-xr-x | db-update | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -47,7 +47,7 @@ OURARCHES=(mips64el) ARCHES=(${ARCHARCHES[@]} ${OURARCHES[@]}) DBEXT=".db.tar.gz" FILESEXT=".files.tar.gz" -PKGEXT=".pkg.tar.xz" +PKGEXT=".pkg.tar.?z" SRCEXT=".src.tar.gz" MAKEPKGCONF="~/.makepkg.conf" @@ -11,11 +11,18 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty -printf '%f ' 2>/dev/null)) +staging_repos=($(find "${STAGING}" -mindepth 1 -type f -name "*${PKGEXT}" -printf '%h\n' | sort -u)) if [ $? -ge 1 ]; then die "Could not read %s" "${STAGING}" fi +repos=() +for staging_repo in "${staging_repos[@]##*/}"; do + if in_array "${staging_repo}" "${PKGREPOS[@]}"; then + repos+=("${staging_repo}") + fi +done + # TODO: this might lock too much (architectures) for repo in "${repos[@]}"; do for pkgarch in "${ARCHES[@]}"; do |