summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2014-01-08 05:20:12 +0000
committerParabola <dev@list.parabolagnulinux.org>2014-01-08 05:20:12 +0000
commit6682aefeafb8d30899e464122864f56318ad7640 (patch)
tree2b3a1dcaf32c7507e86860464d56dcd55f39543f
parent91f6039acb4ba915a3ca3fc366a7159656ec0dc1 (diff)
Don't error about permissions on empty staging repos (feature #460)
-rwxr-xr-xdb-update8
1 files changed, 4 insertions, 4 deletions
diff --git a/db-update b/db-update
index 2d4f28a..b9b8015 100755
--- a/db-update
+++ b/db-update
@@ -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)