Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/package.inc.sh
diff options
context:
space:
mode:
authorErick Cafferata <erick@cafferata.me>2019-01-16 09:06:44 -0500
committerErick Cafferata <erick@cafferata.me>2019-01-17 11:25:25 -0500
commit36732e5441313234068dd49b3494aea62f3a6b4b (patch)
treee07c8d694c8169e1fd9d8152465670158381c0b1 /package.inc.sh
parent99ce8340dc7e33e550efb8fd6f466ad7da5ea456 (diff)
fix parse issue in package_get_repos_with_arch()
- Error happens with repositories with '-' in the name. ie: community-testing, the '<repo>-<arch>' string gets parsed wrong (repo=community,arch=testing-x86_64). - This patch will hold up at least until an arch with a '-' in the name appears.
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/package.inc.sh b/package.inc.sh
index b4f49a5..7af7a82 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -177,7 +177,9 @@ package_get_repos_with_arch() {
pkgname=$1
while read -r path; do
- IFS=/- read -r _ repo arch <<<"$path"
+ path=${path##*/}
+ repo=${path%-*}
+ arch=${path##*-}
printf '%s %s\n' "$repo" "$arch"
done < <(git ls-tree --name-only "remotes/$remote/packages/$pkgname" repos/)
}