summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/pacman-optimize.sh.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in
index 53ae1c78..47fbb492 100644
--- a/scripts/pacman-optimize.sh.in
+++ b/scripts/pacman-optimize.sh.in
@@ -24,6 +24,8 @@
export TEXTDOMAIN='pacman-scripts'
export TEXTDOMAINDIR='@localedir@'
+USE_COLOR='y'
+
declare -r myver='@PACKAGE_VERSION@'
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
@@ -33,7 +35,7 @@ m4_include(library/output_format.sh)
usage() {
printf "pacman-optimize (pacman) %s\n\n" "$myver"
- printf -- "$(gettext "Usage: %s [pacman_db_root]")\n\n" "$0"
+ printf -- "$(gettext "Usage: %s [--nocolor] [pacman_db_root]")\n\n" "$0"
printf -- "$(gettext "\
pacman-optimize is a little hack that should improve the performance\n\
of pacman when reading/writing to its filesystem-based database.\n\n")"
@@ -84,6 +86,13 @@ if [[ $1 = "-V" || $1 = "--version" ]]; then
exit 0
fi
+if [[ $1 = "--nocolor" ]]; then
+ USE_COLOR='n'
+ shift
+fi
+
+m4_include(library/term_colors.sh)
+
if [[ -n $1 ]]; then
dbroot="$1"
fi