diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-09-11 19:54:00 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-09-11 19:54:00 +0200 |
commit | 8768380b62525537e55def81c3273eeb4f9a88d3 (patch) | |
tree | e07165c8b6dbc6875743d6d9a617efd2d4db0d1b | |
parent | e24a59e12360c4c807dde8c24f26035b4cd24287 (diff) | |
download | dbscripts-8768380b62525537e55def81c3273eeb4f9a88d3.tar.gz dbscripts-8768380b62525537e55def81c3273eeb4f9a88d3.tar.xz |
Fix check_repo_permission
-rw-r--r-- | db-functions | 10 |
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 |