1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00

pacman-optimize: use output library

We already use msg() and error() in here, might as well just use the
standard functions. In addition, fix one translated message that would
have printed ERROR twice if anyone ever saw it.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-06-27 13:29:13 -05:00
parent a12acbc2ff
commit 09c803783d
2 changed files with 5 additions and 11 deletions

View File

@ -82,7 +82,9 @@ pacman-key: \
$(srcdir)/pacman-key.sh.in \
$(srcdir)/library/output_format.sh
pacman-optimize: $(srcdir)/pacman-optimize.sh.in
pacman-optimize: \
$(srcdir)/pacman-optimize.sh.in \
$(srcdir)/library/output_format.sh
pkgdelta: \
$(srcdir)/pkgdelta.sh.in \

View File

@ -29,15 +29,7 @@ myver='@PACKAGE_VERSION@'
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
dbroot="${DBPath:-@localstatedir@/lib/pacman/}"
msg() {
local mesg=$1; shift
printf "==> ${mesg}\n" "$@" >&2
}
error () {
local mesg=$1; shift
printf "==> ERROR: ${mesg}\n" "$@" >&2
}
m4_include(library/output_format.sh)
usage() {
printf "pacman-optimize (pacman) %s\n\n" "$myver"
@ -122,7 +114,7 @@ fi
touch "$lockfile"
workdir=$(mktemp -d /tmp/pacman-optimize.XXXXXXXXXX) ||
die_r "$(gettext "ERROR: Can not create temp directory for database building.")\n" >&2
die_r "$(gettext "Can not create temp directory for database building.")\n" >&2
# step 1: sum the old db
msg "$(gettext "MD5sum'ing the old database...")"