From b26d12f75d27e58ce04da45fc901488e4cd95fbf Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 31 Jan 2014 21:20:23 +0100 Subject: fix arch_db_add Signed-off-by: Florian Pritz --- db-functions | 28 ++++++++++++++++------------ 1 file 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" } -- cgit v1.2.3-24-g4f1b