diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-01-31 21:15:22 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-27 15:46:04 +0200 |
commit | 7ef0b1acd5549f94ac2e57b6ca28343bbdbd96ff (patch) | |
tree | 7ec7260395d88cc18ec735a8476e69e0a9d8479d /db-functions | |
parent | 48177ff85854baaf184ebc1c9d46def6398b64d8 (diff) | |
download | dbscripts-7ef0b1acd5549f94ac2e57b6ca28343bbdbd96ff.tar.gz dbscripts-7ef0b1acd5549f94ac2e57b6ca28343bbdbd96ff.tar.xz |
cleanup
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'db-functions')
-rw-r--r-- | db-functions | 37 |
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" |