summaryrefslogtreecommitdiff
path: root/Master/bin/i386-solaris/mktexlsr
diff options
context:
space:
mode:
Diffstat (limited to 'Master/bin/i386-solaris/mktexlsr')
-rwxr-xr-xMaster/bin/i386-solaris/mktexlsr51
1 files changed, 29 insertions, 22 deletions
diff --git a/Master/bin/i386-solaris/mktexlsr b/Master/bin/i386-solaris/mktexlsr
index 9f729e4d495..bd9b56b1906 100755
--- a/Master/bin/i386-solaris/mktexlsr
+++ b/Master/bin/i386-solaris/mktexlsr
@@ -13,12 +13,13 @@
# <te@dbs.uni-hannover.de>, Okt., 1994.
# Public domain.
-version='$Id: mktexlsr,v 1.46 2005/06/21 14:32:26 olaf Exp $'
+version='$Id: mktexlsr 8399 2008-05-28 22:19:34Z karl $'
progname=`echo $0 | sed 's%.*/%%'`
usage="Usage: $progname [DIR]...
-Only options are --help, --version, and --verbose. If standard input is
-a terminal, --verbose is on by default.
+The only options are --help, --version, --verbose, --quiet, and --silent.
+If standard input is a terminal, --verbose is on by default.
+--quiet and --silent are synonyms, and cancel --verbose.
Rebuild all necessary ls-R filename databases completely. If one or
more arguments DIRS are given, these are used as texmf directories to
@@ -55,17 +56,22 @@ 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
- echo "$usage"
- exit 0
-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
+while test $# -gt 0; do
+ if test "x$1" = x--help || test "x$1" = x-help; then
+ echo "$usage"
+ exit 0
+ 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
+ elif test "x$1" = x--quiet || test "x$1" = x--silent \
+ || test "x$1" = x-quiet || test "x$1" = x-silent ; then
+ verbose=false
+ fi
shift
-fi
+done
# mktexupd and mktexlsr make sure they're coordinated via this. A copy
# is found mktex.opt.
@@ -138,18 +144,19 @@ for TEXMFLS_R in "$@"; do
echo "$ls_R_magic" >"$db_file_tmp"
# The main task. We put ./: in the output, so top-level files can be
- # found via ls-R. Probably irrelevant in practice.
- # The sed command inserts the leading ./ for directory names, and
- # removes ., .., and .svn entries from the list. Also omit contents
- # of any .svn directories; sed apparently requires that we do that
- # operation in a separate invocation.
- # We do not try to support colons in directory names.
+ # found via ls-R. Probably irrelevant in practice. The sed command
+ # inserts the leading ./ for directory names, and removes ., .., and
+ # version control entries from the list. Also omit contents of any
+ # the version directories; sed apparently requires that we do that
+ # operation in a separate invocation. We do not try to support colons
+ # in directory names.
#
echo "./:" >>"$db_file_tmp"
+ vc_dirs='\.\(bzr\|git\|hg\|svn\)\|CVS\|RCS\|_darcs'
(cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \
- | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^\.svn$/d;' \
- -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \
- | sed -e '/\.svn.*:$/,/^$/d' \
+ | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \
+ -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \
+ | sed -e /$vc_dirs'.*:$/,/^$/d' \
>>"$db_file_tmp"
# To be really safe, a loop.