summaryrefslogtreecommitdiff
path: root/db-remove
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 17:40:26 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 21:19:01 -0500
commit0811dea8b9c695ed9e67b22d389142956bd1cdd8 (patch)
tree8d300e5cf517ea53f72f22cbf6a3101c1667f2e7 /db-remove
parent1bcc49058febc7e2723c455879da6ff3b9ca6576 (diff)
Fix quoting on arrays.
Diffstat (limited to 'db-remove')
-rwxr-xr-xdb-remove14
1 files changed, 7 insertions, 7 deletions
diff --git a/db-remove b/db-remove
index f0785e5..255aa32 100755
--- a/db-remove
+++ b/db-remove
@@ -10,24 +10,24 @@ fi
repo="$1"
arch="$2"
-pkgbases=(${@:3})
+pkgbases=("${@:3}")
if ! check_repo_permission $repo; then
die "You don't have permission to remove packages from ${repo}"
fi
if [ "$arch" == "any" ]; then
- tarches=(${ARCHES[@]})
+ tarches=("${ARCHES[@]}")
else
tarches=("$arch")
fi
-for tarch in ${tarches[@]}; do
+for tarch in "${tarches[@]}"; do
repo_lock $repo $tarch || exit 1
done
remove_pkgs=()
-for pkgbase in ${pkgbases[@]}; do
+for pkgbase in "${pkgbases[@]}"; do
msg "Removing $pkgbase from [$repo]..."
if [ -d "${SVNREPO}/$repo/$pkgbase" ]; then
@@ -36,11 +36,11 @@ for pkgbase in ${pkgbases[@]}; do
warning "$pkgbase not found in ABS(libre)"
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
+ remove_pkgs+=("$pkgbase")
fi
done
-for tarch in ${tarches[@]}; do
- arch_repo_remove "${repo}" "${tarch}" ${remove_pkgs[@]}
+for tarch in "${tarches[@]}"; do
+ arch_repo_remove "${repo}" "${tarch}" "${remove_pkgs[@]}"
repo_unlock $repo $tarch
done