summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions37
1 files changed, 17 insertions, 20 deletions
diff --git a/db-functions b/db-functions
index 4c22bd8..a8595aa 100644
--- a/db-functions
+++ b/db-functions
@@ -519,27 +519,24 @@ arch_add_to_pool() {
# call arch_add_to_pool first
arch_db_add() {
local repo="$1"
- local pkgfile="${2##*/}"
- local tarches=(${@:3})
+ local tarch="$2"
+ local pkgfile="${3##*/}"
+ local srcfile="$FTP_BASE/${PKGPOOL}/${pkgfile}"
+ local dstdir="$FTP_BASE/$repo/os/$tarch"
- for tarch in ${tarches[@]}; do
- local srcfile="$FTP_BASE/${PKGPOOL}/${pkgfile}"
- 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
+ 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
+ ln -sr "$srcfile" "$dstdir/"
+ if [ -f "${srcfile}.sig" ]; then
+ ln -sr "${srcfile}.sig" "$dstdir/"
+ fi
- arch_repo_add "${repo}" "${tarch}" ${pkgfile}
- arch_history_add "$repo" "$dstdir/$pkgfile" "$tarch"
- done
+ arch_repo_add "${repo}" "${tarch}" ${pkgfile}
+ arch_history_add "$repo" "$dstdir/$pkgfile" "$tarch"
}
arch_db_remove() {
@@ -557,7 +554,7 @@ arch_db_remove() {
arch_history_add() {
local repo="$1"
local pkgfile="$2"
- local tarches="$3"
+ local tarch="$3"
local pkgname=$(getpkgname "$pkgfile")
local pkgbase=$(getpkgbase "$pkgfile")
local pkgver=$(getpkgver "$pkgfile")
@@ -573,7 +570,7 @@ arch_history_add() {
arch_history_remove() {
local repo="$1"
local pkgname="$2"
- local tarches="$3"
+ local tarch="$3"
local history_file="$GITREPO/$repo/$tarch/$pkgname"