From 08fd25502287ba6ad3e141b9a595df879acc7968 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 Aug 2017 14:48:11 +0200 Subject: clean up some bashisms --- bin/clean-cache | 2 +- bin/common-functions | 7 +++++-- bin/return-assignment | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/clean-cache b/bin/clean-cache index 83657b6..b7cef9f 100755 --- a/bin/clean-cache +++ b/bin/clean-cache @@ -15,7 +15,7 @@ fi repos='build-support community-staging community-testing community core extra gnome-unstable kde-unstable staging testing' -mirror"$( +mirror=$( grep -m1 '^Server = ' '/etc/pacman.d/mirrorlist32' | \ cut -d= -f2 | \ sed 's|^\s*||' diff --git a/bin/common-functions b/bin/common-functions index 08fe9ab..14ae06e 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -14,10 +14,13 @@ find_pkgbuilds() { local git_revision="$4" local mod_git_revision="$5" + local repo_path + eval 'repo_path="${repo_paths__'"${git_repository}"'}"' + PKGBUILD=$( - eval git -C "$(printf '"${repo_paths__%s}"' "${git_repository}")" 'archive "${git_revision}" -- "${package}/repos/"' 2> /dev/null | \ + git -C "${repo_path}" archive "${git_revision}" -- "${package}/repos/" 2> /dev/null | \ tar -t 2> /dev/null | \ - grep "^$(str_to_regex "${package}/repos/${repository}")"'-.*/PKGBUILD$' | \ + grep "$(printf '^%s-.*/PKGBUILD' "$(str_to_regex "${package}/repos/${repository}")")" | \ grep -v -- '-i686/PKGBUILD$' | \ grep -v -- '[-/]\(staging\|testing\|unstable\)-[^/]\+/PKGBUILD$' | \ sort | \ diff --git a/bin/return-assignment b/bin/return-assignment index bfd4d5b..ab28c90 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -134,7 +134,7 @@ tar -x \ # check if all packages are signed and all signatures belong to a package signature_errors=$( - ls -1 *.pkg.tar.xz{,.sig} | \ + ls -1 *.pkg.tar.xz *.pkg.tar.xz.sig | \ sed 's|\.sig$||' | \ sort | \ uniq -c | \ -- cgit v1.2.3-70-g09d2