summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-01-31 21:20:23 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-05-27 15:46:04 +0200
commitb26d12f75d27e58ce04da45fc901488e4cd95fbf (patch)
tree782f35ca0c1079d9d0bfae52600bcefbfd4b14e7
parent7ef0b1acd5549f94ac2e57b6ca28343bbdbd96ff (diff)
downloaddbscripts-b26d12f75d27e58ce04da45fc901488e4cd95fbf.tar.gz
dbscripts-b26d12f75d27e58ce04da45fc901488e4cd95fbf.tar.xz
fix arch_db_add
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-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"
}