summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-06-08 00:15:23 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-08 00:15:23 -0600
commitcdf74b6f4f40fa81d9d5445ab2b80903c7854f17 (patch)
treed744df25d46f4e4e7762209536d2d68ce1ad6999 /db-update
parente960e11bfb0d74cf545595ebfabe4965e3a5b1ed (diff)
parent780c57ec14e7ccbf8695ccc159bbee49cf17e237 (diff)
Merge branch 'master' into lukeshu/xbs
# Conflicts: # abslibre # any-to-ours # config # db-cleanup # db-functions # db-libremessages # db-move # db-sync
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update16
1 files changed, 16 insertions, 0 deletions
diff --git a/db-update b/db-update
index 9b9b7b4..559ef3f 100755
--- a/db-update
+++ b/db-update
@@ -63,10 +63,12 @@ for repo in "${repos[@]}"; do
fi
done
+dirs=()
for repo in "${repos[@]}"; do
msg "Updating [%s]..." "${repo}"
any_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-any${PKGEXT} 2>/dev/null))
for pkgarch in "${ARCHES[@]}"; do
+ add_dirs=()
add_pkgs=()
arch_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-"${pkgarch}"${PKGEXT} 2>/dev/null))
for pkg in "${arch_pkgs[@]}" "${any_pkgs[@]}"; do
@@ -84,11 +86,17 @@ for repo in "${repos[@]}"; do
if [ -f "$FTP_BASE/${PKGPOOL}/${pkgfile}.sig" ]; then
ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}"
fi
+ add_dirs+=("${STAGING}/abslibre/$(getpkgarch "$FTP_BASE/$PKGPOOL/$pkgfile")/$repo/$(getpkgbase "$FTP_BASE/$PKGPOOL/$pkgfile")")
add_pkgs+=("${pkgfile}")
done
+ for add_dir in "${add_dirs[@]}"; do
+ (cd "${add_dir}" && xbs release-server "${repo}" "${pkgarch}") ||
+ error 'cd %q && xbs release-server %q %q' "${add_dir}" "${repo}" "${pkgarch}"
+ done
if [ ${#add_pkgs[@]} -ge 1 ]; then
arch_repo_add "${repo}" "${pkgarch}" "${add_pkgs[@]}"
fi
+ dirs+=("${add_dirs[@]}")
done
done
@@ -99,6 +107,14 @@ for repo in "${repos[@]}"; do
done
cd "${STAGING}"
+
+# Remove left over XBS files
+rm -rf -- "${dirs[@]}"
+dirname -z -- "${dirs[@]}" |
+ xargs -0 realpath -zm --relative-to="${STAGING}" -- |
+ xargs -0 rmdir -p -- 2>/dev/null
+
+# Stage generated source files
while read -r file; do
pub="${FTP_BASE}/${file}"
if [[ -f "$pub" ]]; then