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 /db-update | |
parent | b57c78930fec71dc6c5ef8eaa5148a22f75a1fff (diff) | |
parent | 725ab5d12375dd593c375b1a494021bb96135d4f (diff) |
Merge branch 'master' into cleanup
Conflicts:
db-remove
db-update
local_config
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -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) |