summaryrefslogtreecommitdiffstats
path: root/scripts/pacman-optimize.sh.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-27 20:29:13 +0200
committerDan McGee <dan@archlinux.org>2011-06-27 20:30:41 +0200
commit09c803783d0b5e2403bff46af929875701d3791f (patch)
tree333639baa7a8ffc50ab2c1303860f99d2ef3e00b /scripts/pacman-optimize.sh.in
parenta12acbc2ffa8fab9e17168ed10e429c6f47434a6 (diff)
downloadpacman-09c803783d0b5e2403bff46af929875701d3791f.tar.gz
pacman-09c803783d0b5e2403bff46af929875701d3791f.tar.xz
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>
Diffstat (limited to 'scripts/pacman-optimize.sh.in')
-rw-r--r--scripts/pacman-optimize.sh.in12
1 files changed, 2 insertions, 10 deletions
diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in
index c9d42d27..0dc32bfc 100644
--- a/scripts/pacman-optimize.sh.in
+++ b/scripts/pacman-optimize.sh.in
@@ -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...")"