diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 10:45:45 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 10:45:45 -0400 |
commit | a79d7c7251f4e6fd2f8b288b5c91a77a66ecff65 (patch) | |
tree | f44145d6cda8bb20070edf1ce464ad60b6bf3a04 /db-repo-remove | |
parent | f73a4a8844641b780644b8b96865372dc34936bd (diff) | |
parent | 752bd700e9da464006bfbd9877cc858dfad545ba (diff) |
Merge branch 'lukeshu/xbs' into testmerge
# Conflicts:
# test/lib/common.inc
# test/test.d/create-filelists.sh
# test/test.d/db-move.sh
# test/test.d/db-remove.sh
# test/test.d/db-repo-add.sh
# test/test.d/db-repo-remove.sh
# test/test.d/db-update.sh
# test/test.d/ftpdir-cleanup.sh
# test/test.d/sourceballs.sh
Diffstat (limited to 'db-repo-remove')
-rwxr-xr-x | db-repo-remove | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/db-repo-remove b/db-repo-remove index 2a693f4..aadc4ce 100755 --- a/db-repo-remove +++ b/db-repo-remove @@ -1,37 +1,37 @@ #!/bin/bash -. "$(dirname $0)/config" -. "$(dirname $0)/db-functions" +. "$(dirname "$(readlink -e "$0")")/config" +. "$(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 |