summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 14:42:26 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 14:42:26 -0500
commit144e385b05c01546ee0d2203739e4294e43a0826 (patch)
tree0edf04c1be7591eeb135018c9074004c5c5dbd41 /db-update
parentb57c78930fec71dc6c5ef8eaa5148a22f75a1fff (diff)
parent725ab5d12375dd593c375b1a494021bb96135d4f (diff)
Merge branch 'master' into cleanup
Conflicts: db-remove db-update local_config
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update17
1 files changed, 13 insertions, 4 deletions
diff --git a/db-update b/db-update
index ca18ca3..8cf61fc 100755
--- a/db-update
+++ b/db-update
@@ -30,11 +30,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}/${pkg##*/} is a symbolic link"
@@ -95,4 +95,13 @@ for repo in ${repos[@]}; do
done
done
-
+cd "${STAGING}"
+while read -r file; do
+ pub="${FTP_BASE}/${file}"
+ if [[ -f $pub ]]; then
+ warning "file already exists: %s" "${file}"
+ else
+ mkdir -p -- "${pub%/*}"
+ mv -vn "$file" "$pub"
+ fi
+done < <(find other sources -type f)