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:
authorDave Reisner <dreisner@archlinux.org>2016-03-20 16:43:22 -0400
committerDave Reisner <dreisner@archlinux.org>2016-03-20 16:43:22 -0400
commitb91a953f5f67a296b638f2a1a827dab65a57c881 (patch)
treec1ffc47e7fc6e915446fc6415005693feba74451 /package.inc.sh
parentac4cfde7e64f5d753de86ccf1f2a3e2a9f110471 (diff)
fix some things highlighted by shellcheck
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/package.inc.sh b/package.inc.sh
index aeea3ae..14bede9 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -64,7 +64,7 @@ package_log() {
}
package_show_pkgbuild() {
- local pkgname=$1 remote repo subtree blob_id
+ local pkgname=$1 remote repo subtree
if [[ $pkgname = */* ]]; then
IFS=/ read -r repo pkgname <<<"$pkgname"
@@ -78,12 +78,11 @@ package_show_pkgbuild() {
subtree=trunk
fi
- git show "remotes/$remote/packages/$pkgname":"$subtree"/PKGBUILD
+ git show "remotes/$remote/packages/$pkgname:$subtree"/PKGBUILD
}
package_export() {
- local pkgname=$1 remote repo arch
- local mode objtype objid path
+ local pkgname=$1 remote repo arch path
if [[ $pkgname = */* ]]; then
IFS=/ read -r repo pkgname <<<"$pkgname"
@@ -134,8 +133,8 @@ package_get_repos_with_arch() {
local pkgname=$1 remote=$2
local path arch repo
- while read path; do
- IFS=/- read _ repo arch <<<"$path"
+ while read -r path; do
+ IFS=/- read -r _ repo arch <<<"$path"
printf '%s %s\n' "$repo" "$arch"
done < <(git ls-tree --name-only "$remote/packages/$pkgname" repos/)
}
@@ -146,7 +145,7 @@ package_get_arches() {
package_init "$pkgname" remote || return 1
- while read _ arch; do
+ while read -r _ arch; do
arches["$arch"]=1
done < <(package_get_repos_with_arch "$pkgname" "$remote")
@@ -159,7 +158,7 @@ package_get_repos() {
package_init "$pkgname" remote || return 1
- while read repo _; do
+ while read -r repo _; do
repos["$repo"]=1
done < <(package_get_repos_with_arch "$pkgname" "$remote")