diff options
author | Karl Berry <karl@freefriends.org> | 2006-12-25 19:01:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-12-25 19:01:26 +0000 |
commit | f158a7950ae3c424ede851d2f2a8996d2ddbe60e (patch) | |
tree | 8cfcfd77554df5accfecb0db4002d75444b183f3 /Master | |
parent | ecc4ea7255a00022cdd1f36b2513065255332875 (diff) |
mktexlsr --verbose
git-svn-id: svn://tug.org/texlive/trunk@2913 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/bin/alpha-linux/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/hppa-hpux/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/i386-darwin/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/i386-freebsd/mktexlsr | 29 | ||||
-rwxr-xr-x | Master/bin/i386-linux/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/i386-solaris/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/mips-irix/mktexlsr | 29 | ||||
-rwxr-xr-x | Master/bin/powerpc-aix/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/powerpc-darwin/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/sparc-linux/mktexlsr | 15 | ||||
-rwxr-xr-x | Master/bin/sparc-solaris/mktexlsr | 29 | ||||
-rwxr-xr-x | Master/bin/x86_64-linux/mktexlsr | 15 |
12 files changed, 162 insertions, 60 deletions
diff --git a/Master/bin/alpha-linux/mktexlsr b/Master/bin/alpha-linux/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/alpha-linux/mktexlsr +++ b/Master/bin/alpha-linux/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 diff --git a/Master/bin/hppa-hpux/mktexlsr b/Master/bin/hppa-hpux/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/hppa-hpux/mktexlsr +++ b/Master/bin/hppa-hpux/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 diff --git a/Master/bin/i386-darwin/mktexlsr b/Master/bin/i386-darwin/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/i386-darwin/mktexlsr +++ b/Master/bin/i386-darwin/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 diff --git a/Master/bin/i386-freebsd/mktexlsr b/Master/bin/i386-freebsd/mktexlsr index 3d2523d875b..9f729e4d495 100755 --- a/Master/bin/i386-freebsd/mktexlsr +++ b/Master/bin/i386-freebsd/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,17 +134,23 @@ 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 # found via ls-R. Probably irrelevant in practice. # The sed command inserts the leading ./ for directory names, and - # removes . and .. from the list. Note that using colons in directory - # names results in nothing but grief. + # 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. + # echo "./:" >>"$db_file_tmp" - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) | - sed '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^[\.\/]*lsR[0-9]*\.tmp:*$/d' >>"$db_file_tmp" + (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' \ + >>"$db_file_tmp" # To be really safe, a loop. until PERMS=`kpsestat = "$db_file"`; do sleep 1; done @@ -146,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 diff --git a/Master/bin/i386-linux/mktexlsr b/Master/bin/i386-linux/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/i386-linux/mktexlsr +++ b/Master/bin/i386-linux/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 diff --git a/Master/bin/i386-solaris/mktexlsr b/Master/bin/i386-solaris/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/i386-solaris/mktexlsr +++ b/Master/bin/i386-solaris/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 diff --git a/Master/bin/mips-irix/mktexlsr b/Master/bin/mips-irix/mktexlsr index 3d2523d875b..9f729e4d495 100755 --- a/Master/bin/mips-irix/mktexlsr +++ b/Master/bin/mips-irix/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,17 +134,23 @@ 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 # found via ls-R. Probably irrelevant in practice. # The sed command inserts the leading ./ for directory names, and - # removes . and .. from the list. Note that using colons in directory - # names results in nothing but grief. + # 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. + # echo "./:" >>"$db_file_tmp" - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) | - sed '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^[\.\/]*lsR[0-9]*\.tmp:*$/d' >>"$db_file_tmp" + (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' \ + >>"$db_file_tmp" # To be really safe, a loop. until PERMS=`kpsestat = "$db_file"`; do sleep 1; done @@ -146,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 diff --git a/Master/bin/powerpc-aix/mktexlsr b/Master/bin/powerpc-aix/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/powerpc-aix/mktexlsr +++ b/Master/bin/powerpc-aix/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 diff --git a/Master/bin/powerpc-darwin/mktexlsr b/Master/bin/powerpc-darwin/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/powerpc-darwin/mktexlsr +++ b/Master/bin/powerpc-darwin/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 diff --git a/Master/bin/sparc-linux/mktexlsr b/Master/bin/sparc-linux/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/sparc-linux/mktexlsr +++ b/Master/bin/sparc-linux/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 diff --git a/Master/bin/sparc-solaris/mktexlsr b/Master/bin/sparc-solaris/mktexlsr index 3d2523d875b..9f729e4d495 100755 --- a/Master/bin/sparc-solaris/mktexlsr +++ b/Master/bin/sparc-solaris/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,17 +134,23 @@ 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 # found via ls-R. Probably irrelevant in practice. # The sed command inserts the leading ./ for directory names, and - # removes . and .. from the list. Note that using colons in directory - # names results in nothing but grief. + # 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. + # echo "./:" >>"$db_file_tmp" - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) | - sed '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^[\.\/]*lsR[0-9]*\.tmp:*$/d' >>"$db_file_tmp" + (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' \ + >>"$db_file_tmp" # To be really safe, a loop. until PERMS=`kpsestat = "$db_file"`; do sleep 1; done @@ -146,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 diff --git a/Master/bin/x86_64-linux/mktexlsr b/Master/bin/x86_64-linux/mktexlsr index 663c36c1598..9f729e4d495 100755 --- a/Master/bin/x86_64-linux/mktexlsr +++ b/Master/bin/x86_64-linux/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 |