summaryrefslogtreecommitdiff
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
parentb57c78930fec71dc6c5ef8eaa5148a22f75a1fff (diff)
parent725ab5d12375dd593c375b1a494021bb96135d4f (diff)
Merge branch 'master' into cleanup
Conflicts: db-remove db-update local_config
-rwxr-xr-xdb-cleanup4
-rwxr-xr-xdb-remove2
-rwxr-xr-xdb-update17
3 files changed, 16 insertions, 7 deletions
diff --git a/db-cleanup b/db-cleanup
index 364f400..57ef36e 100755
--- a/db-cleanup
+++ b/db-cleanup
@@ -42,7 +42,7 @@ for _repo in ${PKGREPOS[@]}; do
bsdtar tf "${dbfile}" | \
cut -d'/' -f1 | \
sort -u | \
- sed "s|$|*|" >> /tmp/$0.$$.filter
+ sed "s|$|*|" >> /tmp/${0##*/}.$$.filter
done
done
@@ -53,7 +53,7 @@ for POOL in ${PKGPOOLS[@]} ${SRCPOOLS[@]}; do
msg2 "${POOL}"
rsync ${EXTRAFLAGS} -va --delete-excluded \
- --include-from="/tmp/$0.$$.filter" \
+ --include-from="/tmp/${0##*/}.$$.filter" \
--exclude="*" \
${FTP_BASE}/${POOL}/ \
${FTP_BASE}/${POOL}/
diff --git a/db-remove b/db-remove
index 993574f..1c25e5c 100755
--- a/db-remove
+++ b/db-remove
@@ -34,7 +34,7 @@ for pkgbase in ${pkgbases[@]}; do
remove_pkgs+=($(. "$path/PKGBUILD"; echo ${pkgname[@]}))
xbs unrelease "$pkgbase" "$repo" "$arch"
else
- warning "$pkgbase not found in $repo-$arch"
+ warning "$pkgbase not found in XBS $repo-$arch"
warning "Removing only $pkgbase from the repo"
warning "If it was a split package you have to remove the others yourself!"
remove_pkgs+=($pkgbase)
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)