summaryrefslogtreecommitdiffstats
path: root/db-update
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-update
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-update')
-rwxr-xr-xdb-update6
1 files changed, 1 insertions, 5 deletions
diff --git a/db-update b/db-update
index 3a49f0a..5bdce5e 100755
--- a/db-update
+++ b/db-update
@@ -67,11 +67,7 @@ for repo in ${repos[@]}; do
add_pkgs[${#add_pkgs[*]}]=${pkgfile}
done
if [ ${#add_pkgs[@]} -ge 1 ]; then
- pushd "$FTP_BASE/$repo/os/${pkgarch}" >/dev/null
- /usr/bin/repo-add -q "$repo$DBEXT" ${add_pkgs[@]} >/dev/null \
- || die "repo-add $repo$DBEXT ${add_pkgs[@]}"
- popd >/dev/null
- set_repo_permission "${repo}" "${pkgarch}"
+ arch_repo_add "${repo}" "${pkgarch}" ${add_pkgs[@]}
fi
done
done