From 43f8af33f08924092826e2094d15be704e842f3a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Jun 2014 00:32:24 -0400 Subject: more quoting and printf fixes --- db-repo-remove | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'db-repo-remove') 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##*/} ..." + msg "usage: %s ..." "${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 -- cgit v1.2.3-2-g168b