summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asp.in6
-rw-r--r--package.inc.sh15
-rw-r--r--remote.inc.sh4
3 files changed, 11 insertions, 14 deletions
diff --git a/asp.in b/asp.in
index 9c4a094..a0fdb2e 100644
--- a/asp.in
+++ b/asp.in
@@ -139,15 +139,15 @@ list_all() {
}
shortlog() {
- package_log "$@" "$FUNCNAME"
+ package_log "$@" "${FUNCNAME[0]}"
}
log() {
- package_log "$@" "$FUNCNAME"
+ package_log "$@" "${FUNCNAME[0]}"
}
difflog() {
- package_log "$@" "$FUNCNAME"
+ package_log "$@" "${FUNCNAME[0]}"
}
gc() {
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")
diff --git a/remote.inc.sh b/remote.inc.sh
index 61204bf..826ab37 100644
--- a/remote.inc.sh
+++ b/remote.inc.sh
@@ -1,5 +1,3 @@
-declare -A refcache=()
-
__remote_refcache_update() {
local remote=$1 cachefile=$ASPCACHE/remote-$remote
@@ -11,7 +9,7 @@ __remote_refcache_update() {
}
__remote_refcache_get() {
- local remote=$1 ttl=3600 now= cachetime= cachefile=$ASPCACHE/remote-$remote
+ local remote=$1 ttl=3600 now cachetime cachefile=$ASPCACHE/remote-$remote
printf -v now '%(%s)T' -1