summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-09-11 19:54:00 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-09-11 19:54:00 +0200
commit8768380b62525537e55def81c3273eeb4f9a88d3 (patch)
treee07165c8b6dbc6875743d6d9a617efd2d4db0d1b
parente24a59e12360c4c807dde8c24f26035b4cd24287 (diff)
downloaddbscripts-8768380b62525537e55def81c3273eeb4f9a88d3.tar.gz
dbscripts-8768380b62525537e55def81c3273eeb4f9a88d3.tar.xz
Fix check_repo_permission
-rw-r--r--db-functions10
1 files changed, 4 insertions, 6 deletions
diff --git a/db-functions b/db-functions
index 4081d54..18029ee 100644
--- a/db-functions
+++ b/db-functions
@@ -402,12 +402,10 @@ check_repo_permission() {
[ -w "$FTP_BASE/$(get_pkgpool_for_host)" ] || return 1
local arch
- for arch in ${ARCHES} any; do
- local w
- local ws=("${FTP_BASE}/${repo}/os/${arch}/"{,${repo}${DBEXT}})
- for w in ws; do
- [ -w ] || return 1
- done
+ for arch in ${ARCHES}; do
+ local dir="${FTP_BASE}/${repo}/os/${arch}/"
+ [ -w "${dir}" ] || return 1
+ [ -f "${dir}"${repo}${DBEXT} -a ! -w "${dir}"${repo}${DBEXT} ] && return 1
done
return 0