summaryrefslogtreecommitdiffstats
path: root/db-move
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-01-15 01:12:09 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-01-15 01:12:09 +0100
commit4da9bf112b07c94a7fd65a729ce62610ade8e5aa (patch)
tree326b793a2b8a2bacc43be518d0f209557d8afd03 /db-move
parent7519447709e1ac9a5b5edaa04b32c03ac09ee2ef (diff)
downloaddbscripts-4da9bf112b07c94a7fd65a729ce62610ade8e5aa.tar.gz
dbscripts-4da9bf112b07c94a7fd65a729ce62610ade8e5aa.tar.xz
Move repo manipulation code into common functions
repo-add and repo-remove is now indirectly called by arch_repo_add/remove. This simplifies future extensions like incremental file list creations. See FS#11302
Diffstat (limited to 'db-move')
-rwxr-xr-xdb-move9
1 files changed, 2 insertions, 7 deletions
diff --git a/db-move b/db-move
index cdc261c..ae21781 100755
--- a/db-move
+++ b/db-move
@@ -106,13 +106,8 @@ done
for tarch in ${ARCHES[@]}; do
if [ -n "${add_pkgs[${tarch}]}" ]; then
- /usr/bin/repo-add -q "${ftppath_to}/${tarch}/${repo_to}${DBEXT}" ${add_pkgs[${tarch}]} >/dev/null \
- || error "repo-add ${tarch}/${repo_to}${DBEXT} ${add_pkgs[${tarch}]}"
- set_repo_permission "${repo_to}" "${tarch}"
-
- /usr/bin/repo-remove -q "${ftppath_from}/${tarch}/${repo_from}${DBEXT}" ${remove_pkgs[${tarch}]} >/dev/null \
- || error "repo-remove ${tarch}/${repo_from}${DBEXT} ${remove_pkgs[${tarch}]}"
- set_repo_permission "${repo_from}" "${tarch}"
+ arch_repo_add "${repo_to}" "${tarch}" ${add_pkgs[${tarch}]}
+ arch_repo_remove "${repo_from}" "${tarch}" ${remove_pkgs[${tarch}]}
fi
done