summaryrefslogtreecommitdiffstats
path: root/db-remove
diff options
context:
space:
mode:
Diffstat (limited to 'db-remove')
-rwxr-xr-xdb-remove33
1 files changed, 18 insertions, 15 deletions
diff --git a/db-remove b/db-remove
index 7e2282a..a3e03e6 100755
--- a/db-remove
+++ b/db-remove
@@ -10,7 +10,7 @@ fi
repo="$1"
arch="$2"
-pkgbase="$3"
+pkgbases=(${@:3})
ftppath="$FTP_BASE/$repo/os"
svnrepo="$repo-$arch"
@@ -29,21 +29,24 @@ for tarch in ${tarches[@]}; do
repo_lock $repo $tarch || exit 1
done
-msg "Removing $pkgbase from [$repo]..."
-/usr/bin/svn checkout -q "${SVNREPO}/${pkgbase}" "${WORKDIR}/svn/${pkgbase}" >/dev/null
-
-if [ -d "${WORKDIR}/svn/$pkgbase/repos/$svnrepo" ]; then
- pkgnames=($(. "${WORKDIR}/svn/$pkgbase/repos/$svnrepo/PKGBUILD"; echo ${pkgname[@]}))
- /usr/bin/svn rm --force -q "${WORKDIR}/svn/$pkgbase/repos/$svnrepo"
- /usr/bin/svn commit -q "${WORKDIR}/svn/$pkgbase" -m "$(basename $0): $pkgbase removed by $(id -un)"
-else
- warning "$pkgbase not found in $svnrepo"
- warning "Removing only $pkgbase from the repo"
- warning "If it was a split package you have to remove the others yourself!"
- pkgnames=($pkgbase)
-fi
+remove_pkgs=()
+for pkgbase in ${pkgbases[@]}; do
+ msg "Removing $pkgbase from [$repo]..."
+ /usr/bin/svn checkout -q "${SVNREPO}/${pkgbase}" "${WORKDIR}/svn/${pkgbase}" >/dev/null
+
+ if [ -d "${WORKDIR}/svn/$pkgbase/repos/$svnrepo" ]; then
+ remove_pkgs=(${remove_pkgs[@]} $(. "${WORKDIR}/svn/$pkgbase/repos/$svnrepo/PKGBUILD"; echo ${pkgname[@]}))
+ /usr/bin/svn rm --force -q "${WORKDIR}/svn/$pkgbase/repos/$svnrepo"
+ /usr/bin/svn commit -q "${WORKDIR}/svn/$pkgbase" -m "$(basename $0): $pkgbase removed by $(id -un)"
+ else
+ warning "$pkgbase not found in $svnrepo"
+ warning "Removing only $pkgbase from the repo"
+ warning "If it was a split package you have to remove the others yourself!"
+ remove_pkgs[${#remove_pkgs[*]}]=$pkgbase
+ fi
+done
for tarch in ${tarches[@]}; do
- arch_repo_remove "${repo}" "${tarch}" ${pkgnames[@]}
+ arch_repo_remove "${repo}" "${tarch}" ${remove_pkgs[@]}
repo_unlock $repo $tarch
done