summaryrefslogtreecommitdiff
path: root/db-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-remove
parent426c14d9a8364193dec631a389470fb4465ef9ce (diff)
more quoting and printf fixes
Diffstat (limited to 'db-remove')
-rwxr-xr-xdb-remove16
1 files changed, 8 insertions, 8 deletions
diff --git a/db-remove b/db-remove
index 73919be..970d252 100755
--- a/db-remove
+++ b/db-remove
@@ -4,7 +4,7 @@
. "$(dirname "$(readlink -e "$0")")/db-functions"
if [ $# -lt 3 ]; then
- msg "usage: ${0##*/} <repo> <arch> <pkgname|pkgbase> ..."
+ msg "usage: %s <repo> <arch> <pkgname|pkgbase> ..." "${0##*/}"
exit 1
fi
@@ -12,8 +12,8 @@ repo="$1"
arch="$2"
pkgbases=("${@:3}")
-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
@@ -23,19 +23,19 @@ else
fi
for tarch in "${tarches[@]}"; do
- repo_lock $repo $tarch || exit 1
+ repo_lock "$repo" "$tarch" || exit 1
done
remove_pkgs=()
for pkgbase in "${pkgbases[@]}"; do
- msg "Removing $pkgbase from [$repo]..."
+ msg "Removing %s from [%s]..." "$pkgbase" "$repo"
path="$(xbs releasepath "$pkgbase" "$repo" "$arch")"
if [ -d "$path" ]; then
eval "remove_pkgs+=($(. "$path/PKGBUILD"; printf '%q ' "${pkgname[@]}"))"
xbs unrelease "$pkgbase" "$repo" "$arch"
else
- warning "$pkgbase not found in XBS $repo-$arch"
- warning "Removing only $pkgbase from the repo"
+ warning "%s not found in XBS %s" "$pkgbase" "$repo-$arch"
+ warning "Removing only %s from the repo" "$pkgbase"
warning "If it was a split package you have to remove the others yourself!"
remove_pkgs+=("$pkgbase")
fi
@@ -43,5 +43,5 @@ done
for tarch in "${tarches[@]}"; do
arch_repo_remove "${repo}" "${tarch}" "${remove_pkgs[@]}"
- repo_unlock $repo $tarch
+ repo_unlock "$repo" "$tarch"
done