Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-27 12:07:16 +0200
committerErich Eckner <git@eckner.net>2017-07-27 12:07:16 +0200
commitf5e79adb30cc33c51e99891f00fffaec8b1e8506 (patch)
treea7c19c9b64b571511d44dd067a164cdbafc89a06
parent2f394fd511e9f9d8bce1f2eb1c4350554718e21a (diff)
bin/common-functions: do not "ls" in git archive
-rwxr-xr-xbin/common-functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/common-functions b/bin/common-functions
index cd2aa8d..412624e 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -67,6 +67,7 @@ find_git_repository_to_package_repository() {
local repository
local package_repository
+ local repo_path
package_repository="$1"
@@ -79,8 +80,11 @@ find_git_repository_to_package_repository() {
if [ "${repository}" = "archlinux32" ]; then
continue
fi
- if eval ls "$(printf '"${repo_paths__%s}"' "${repository}")/"*"/repos" | \
- grep -v ':$' | \
+ eval 'repo_path="${repo_paths__'"${repository}"'}"'
+ if git -C "${repo_path}" archive "$(cat "${work_dir}/${repository}.revision")" -- | \
+ tar -t --wildcards '*/repos' | \
+ grep '^\([^/]\+/\)\{3\}PKGBUILD$' | \
+ cut -d/ -f3 | \
sed 's|-[^-]\+$||' | \
sort -u | \
grep -qxF "${package_repository}"; then