diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-08 14:42:26 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-08 14:42:26 -0500 |
commit | 144e385b05c01546ee0d2203739e4294e43a0826 (patch) | |
tree | 0edf04c1be7591eeb135018c9074004c5c5dbd41 | |
parent | b57c78930fec71dc6c5ef8eaa5148a22f75a1fff (diff) | |
parent | 725ab5d12375dd593c375b1a494021bb96135d4f (diff) |
Merge branch 'master' into cleanup
Conflicts:
db-remove
db-update
local_config
-rwxr-xr-x | db-cleanup | 4 | ||||
-rwxr-xr-x | db-remove | 2 | ||||
-rwxr-xr-x | db-update | 17 |
3 files changed, 16 insertions, 7 deletions
@@ -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}/ @@ -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) @@ -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) |