diff options
author | Karl Berry <karl@freefriends.org> | 2006-12-25 18:44:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-12-25 18:44:54 +0000 |
commit | 6f0aeed9a50a10370d169056944a4d9c7895e353 (patch) | |
tree | aa303a823515bb2056e103f29659530b9c83c9e2 /Build | |
parent | d736f338cde97e961eacd8d97156d25698ea1dad (diff) |
support --verbose.
git-svn-id: svn://tug.org/texlive/trunk@2910 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-x | Build/source/texk/kpathsea/mktexlsr | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/mktexlsr b/Build/source/texk/kpathsea/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Build/source/texk/kpathsea/mktexlsr +++ b/Build/source/texk/kpathsea/mktexlsr @@ -15,7 +15,10 @@ version='$Id: mktexlsr,v 1.46 2005/06/21 14:32:26 olaf Exp $' progname=`echo $0 | sed 's%.*/%%'` -usage="Usage: $progname [DIRS ...] +usage="Usage: $progname [DIR]... + +Only options are --help, --version, and --verbose. If standard input is +a terminal, --verbose is on by default. Rebuild all necessary ls-R filename databases completely. If one or more arguments DIRS are given, these are used as texmf directories to @@ -33,7 +36,6 @@ case `uname -s` in esac if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - # Add the location of the script to the PATH if necessary. This must # be done before kpsewhich can be called, and thus cannot be put into # mktex.opt. @@ -49,6 +51,8 @@ case $dirname in export PATH ;; esac +if tty -s; then verbose=true; else verbose=false; fi + # A copy of some stuff from mktex.opt, so we can run in the presence of # terminally damaged ls-R files. if test "x$1" = x--help || test "x$1" = x-help; then @@ -58,6 +62,9 @@ elif test "x$1" = x--version || test "x$1" = x-version; then echo "`basename $0` $version" kpsewhich --version exit 0 +elif test "x$1" = x--verbose || test "x$1" = x-verbose; then + verbose=true + shift fi # mktexupd and mktexlsr make sure they're coordinated via this. A copy @@ -127,7 +134,7 @@ for TEXMFLS_R in "$@"; do db_file_tmp="$db_dir_tmp/lsR$$.tmp" rm -f "$db_file_tmp" - tty -s && echo "$progname: Updating $db_file... " >&2 + $verbose && echo "$progname: Updating $db_file... " >&2 echo "$ls_R_magic" >"$db_file_tmp" # The main task. We put ./: in the output, so top-level files can be @@ -152,5 +159,5 @@ for TEXMFLS_R in "$@"; do mv "$db_file_tmp" "$db_file" rm -rf "$db_dir_tmp" done -tty -s && echo "$progname: Done." >&2 +$verbose && echo "$progname: Done." >&2 exit 0 |