summaryrefslogtreecommitdiffstats
path: root/db-repo-remove
diff options
context:
space:
mode:
Diffstat (limited to 'db-repo-remove')
-rwxr-xr-xdb-repo-remove13
1 files changed, 7 insertions, 6 deletions
diff --git a/db-repo-remove b/db-repo-remove
index e55cd07..4f04ed1 100755
--- a/db-repo-remove
+++ b/db-repo-remove
@@ -3,14 +3,14 @@
. "$(dirname $0)/db-functions"
. "$(dirname $0)/config"
-if [ $# -ne 3 ]; then
- msg "usage: $(basename $0) <repo> <arch> <pkgname>"
+if [ $# -lt 3 ]; then
+ msg "usage: $(basename $0) <repo> <arch> <pkgname> ..."
exit 1
fi
repo="$1"
arch="$2"
-pkgname="$3"
+pkgnames=(${@:3})
ftppath="$FTP_BASE/$repo/os"
@@ -28,9 +28,10 @@ for tarch in ${tarches[@]}; do
repo_lock $repo $tarch || exit 1
done
-msg "Removing $pkgname from [$repo]..."
-
for tarch in ${tarches[@]}; do
- arch_repo_remove "${repo}" "${tarch}" ${pkgname}
+ for pkgname in ${pkgnames[@]}; do
+ msg "Removing $pkgname from [$repo]..."
+ done
+ arch_repo_remove "${repo}" "${tarch}" ${pkgnames[@]}
repo_unlock $repo $tarch
done