diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2014-01-08 05:20:12 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2014-01-08 05:20:12 +0000 |
commit | 6682aefeafb8d30899e464122864f56318ad7640 (patch) | |
tree | 2b3a1dcaf32c7507e86860464d56dcd55f39543f | |
parent | 91f6039acb4ba915a3ca3fc366a7159656ec0dc1 (diff) |
Don't error about permissions on empty staging repos (feature #460)
-rwxr-xr-x | db-update | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -23,11 +23,11 @@ done # check if packages are valid for repo in ${repos[@]}; do - if ! check_repo_permission "${repo}"; then - die "You don't have permission to update packages in ${repo}" - fi pkgs=($(getpkgfiles "${STAGING}/${repo}/"*${PKGEXT})) if [ $? -eq 0 ]; then + if [ ${#pkgs[@]} -gt 0 ] && ! check_repo_permission "${repo}"; then + die "You don't have permission to update packages in ${repo}" + fi for pkg in ${pkgs[@]}; do if [ -h "${pkg}" ]; then die "Package ${repo}/$(basename ${pkg}) is a symbolic link" @@ -92,4 +92,4 @@ while read -r file; do mkdir -p -- "${pub%/*}" mv -vn "$file" "$pub" fi -done < <(find other -type f) +done < <(find other sources -type f) |