summaryrefslogtreecommitdiff
path: root/db-repo-remove
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 00:32:24 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 00:32:24 -0400
commit43f8af33f08924092826e2094d15be704e842f3a (patch)
tree73b982bf9356c397085b3a0d0f1360708a799288 /db-repo-remove
parent426c14d9a8364193dec631a389470fb4465ef9ce (diff)
more quoting and printf fixes
Diffstat (limited to 'db-repo-remove')
-rwxr-xr-xdb-repo-remove24
1 files changed, 12 insertions, 12 deletions
diff --git a/db-repo-remove b/db-repo-remove
index 7077d62..aadc4ce 100755
--- a/db-repo-remove
+++ b/db-repo-remove
@@ -4,34 +4,34 @@
. "$(dirname "$(readlink -e "$0")")/db-functions"
if [ $# -lt 3 ]; then
- msg "usage: ${0##*/} <repo> <arch> <pkgname> ..."
+ msg "usage: %s <repo> <arch> <pkgname> ..." "${0##*/}"
exit 1
fi
repo="$1"
arch="$2"
-pkgnames=(${@:3})
+pkgnames=("${@:3}")
ftppath="$FTP_BASE/$repo/os"
-if ! check_repo_permission $repo; then
- die "You don't have permission to remove packages from ${repo}"
+if ! check_repo_permission "$repo"; then
+ die "You don't have permission to remove packages from %s" "${repo}"
fi
if [ "$arch" == "any" ]; then
- tarches=(${ARCHES[@]})
+ tarches=("${ARCHES[@]}")
else
tarches=("$arch")
fi
-for tarch in ${tarches[@]}; do
- repo_lock $repo $tarch || exit 1
+for tarch in "${tarches[@]}"; do
+ repo_lock "$repo" "$tarch" || exit 1
done
-for tarch in ${tarches[@]}; do
- for pkgname in ${pkgnames[@]}; do
- msg "Removing $pkgname from [$repo]..."
+for tarch in "${tarches[@]}"; do
+ for pkgname in "${pkgnames[@]}"; do
+ msg "Removing %s from [%s]..." "$pkgname" "$repo"
done
- arch_repo_remove "${repo}" "${tarch}" ${pkgnames[@]}
- repo_unlock $repo $tarch
+ arch_repo_remove "${repo}" "${tarch}" "${pkgnames[@]}"
+ repo_unlock "$repo" "$tarch"
done