summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db-functions28
1 files changed, 16 insertions, 12 deletions
diff --git a/db-functions b/db-functions
index a8595aa..ed986c9 100644
--- a/db-functions
+++ b/db-functions
@@ -520,22 +520,26 @@ arch_add_to_pool() {
arch_db_add() {
local repo="$1"
local tarch="$2"
- local pkgfile="${3##*/}"
- local srcfile="$FTP_BASE/${PKGPOOL}/${pkgfile}"
+ local pkgfiles=("${@:3}")
+ pkgfiles=("${pkgfiles##*/}")
local dstdir="$FTP_BASE/$repo/os/$tarch"
- if [[ ! -f "${srcfile}" ]]; then
- die "Package file ${pkgfile} not found in ${FTP_BASE}/${PKGPOOL}"
- else
- msg "Adding $pkgfile to [$repo]-$tarch..."
- fi
+ for pkgfile in "${pkgfiles[@]}"; do
+ local srcfile="$FTP_BASE/${PKGPOOL}/${pkgfile}"
- ln -sr "$srcfile" "$dstdir/"
- if [ -f "${srcfile}.sig" ]; then
- ln -sr "${srcfile}.sig" "$dstdir/"
- fi
+ if [[ ! -f "${srcfile}" ]]; then
+ die "Package file ${pkgfile} not found in ${FTP_BASE}/${PKGPOOL}"
+ else
+ msg "Adding $pkgfile to [$repo]-$tarch..."
+ fi
+
+ ln -sr "$srcfile" "$dstdir/"
+ if [ -f "${srcfile}.sig" ]; then
+ ln -sr "${srcfile}.sig" "$dstdir/"
+ fi
+ done
- arch_repo_add "${repo}" "${tarch}" ${pkgfile}
+ arch_repo_add "${repo}" "${tarch}" "${pkgfiles[@]}"
arch_history_add "$repo" "$dstdir/$pkgfile" "$tarch"
}