summaryrefslogtreecommitdiff
path: root/db-repo-add
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-add
parent426c14d9a8364193dec631a389470fb4465ef9ce (diff)
more quoting and printf fixes
Diffstat (limited to 'db-repo-add')
-rwxr-xr-xdb-repo-add26
1 files changed, 13 insertions, 13 deletions
diff --git a/db-repo-add b/db-repo-add
index a6355a1..4611bdf 100755
--- a/db-repo-add
+++ b/db-repo-add
@@ -4,38 +4,38 @@
. "$(dirname "$(readlink -e "$0")")/db-functions"
if [ $# -lt 3 ]; then
- msg "usage: ${0##*/} <repo> <arch> <pkgfile> ..."
+ msg "usage: %s <repo> <arch> <pkgfile> ..." "${0##*/}"
exit 1
fi
repo="$1"
arch="$2"
-pkgfiles=(${@:3})
+pkgfiles=("${@:3}")
ftppath="$FTP_BASE/$repo/os"
-if ! check_repo_permission $repo; then
- die "You don't have permission to add packages to ${repo}"
+if ! check_repo_permission "$repo"; then
+ die "You don't have permission to add packages to %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 pkgfile in ${pkgfiles[@]}; do
+for tarch in "${tarches[@]}"; do
+ for pkgfile in "${pkgfiles[@]}"; do
if [[ ! -f "${FTP_BASE}/${repo}/os/${arch}/${pkgfile##*/}" ]]; then
- die "Package file ${pkgfile##*/} not found in ${FTP_BASE}/${repo}/os/${arch}/"
+ die "Package file %s not found in %s" "${pkgfile##*/}" "${FTP_BASE}/${repo}/os/${arch}/"
else
- msg "Adding $pkgfile to [$repo]..."
+ msg "Adding %s to [%s]..." "$pkgfile" "$repo"
fi
done
- arch_repo_add "${repo}" "${tarch}" ${pkgfiles[@]}
- repo_unlock $repo $tarch
+ arch_repo_add "${repo}" "${tarch}" "${pkgfiles[@]}"
+ repo_unlock "$repo" "$tarch"
done