summaryrefslogtreecommitdiff
path: root/db-sync
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 13:45:10 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 13:45:10 -0400
commit386c2d00249eb244bbcc9a173a64f9435b70180a (patch)
tree8930f8ccf7588bf2a6c256810d4c4e0ced3bf1a4 /db-sync
parentba575a4e64be157eeae1028ed86b29cb0042f41b (diff)
Use printf formatters instead of string interpolation.
I used this command to find them: egrep -r --exclude-dir={test,.git} '(plain|msg|msg2|warning|error|stat_busy|stat_done|abort|die)\s+"?[^"]*\$'
Diffstat (limited to 'db-sync')
-rwxr-xr-xdb-sync8
1 files changed, 4 insertions, 4 deletions
diff --git a/db-sync b/db-sync
index 9b90219..58e211d 100755
--- a/db-sync
+++ b/db-sync
@@ -71,7 +71,7 @@ init() {
# Traverse all repo-arch pairs
for _repo in "${ARCHREPOS[@]}"; do
for _arch in "${ARCHARCHES[@]}"; do
- msg "Processing ${_repo}-${_arch}"
+ msg "Processing %s-%s" "${_repo}-${_arch}"
db_file=$(get_repo_file "${_repo}" "${_arch}")${DBEXT}
files_file=$(get_repo_file "${_repo}" "${_arch}")${FILESEXT}
@@ -106,7 +106,7 @@ init() {
# pass through
printf '%s\n' "${db[@]}" | sed "s|.$|&*|g" > "/tmp/${_repo}-${_arch}.whitelist"
- msg2 "$(wc -l /tmp/${_repo}-${_arch}.whitelist | cut -d' ' -f1) packages in whitelist"
+ msg2 "%d packages in whitelist" "$(wc -l /tmp/${_repo}-${_arch}.whitelist | cut -d' ' -f1)"
# Sync excluding everything but whitelist
# We delete here for cleanup
@@ -139,7 +139,7 @@ init() {
# Concatenate all whitelists, check for single *s just in case
cat "${whitelists[@]}" | grep -v "^\*$" | sort -u > /tmp/any.whitelist
- msg2 "Retrieving $(wc -l /tmp/any.whitelist | cut -d' ' -f1) packages from pool"
+ msg2 "Retrieving %d packages from pool" "$(wc -l /tmp/any.whitelist | cut -d' ' -f1)"
# Sync
# *Don't delete-after*, this is the job of cleanup scripts. It will remove our
@@ -192,7 +192,7 @@ source "$(dirname "$(readlink -e "$0")")/libremessages"
# Check variables presence
for var in DBEXT FILESEXT mirror mirrorpath WORKDIR BLACKLIST_FILE FTP_BASE ARCHSRCPOOLS ARCHPKGPOOLS; do
- test -z "${!var}" && fatal_error "Empty ${var}"
+ test -z "${!var}" && fatal_error "Empty %s" "${var}"
done
# From makepkg