diff options
author | Karl Berry <karl@freefriends.org> | 2011-06-09 22:36:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-06-09 22:36:32 +0000 |
commit | 84d55c5c9b8767ddcba1899370e3e3aebb22fa8a (patch) | |
tree | 945e0026c1d66018bb25a0e974f6d1ef7cb7d982 /Master/bin/powerpc-linux/mktexlsr | |
parent | 559eb58c62e1b7cbb20311e08e21b44b7eb6f141 (diff) |
powerpc-linux from ts
git-svn-id: svn://tug.org/texlive/trunk@22895 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/powerpc-linux/mktexlsr')
-rwxr-xr-x | Master/bin/powerpc-linux/mktexlsr | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/Master/bin/powerpc-linux/mktexlsr b/Master/bin/powerpc-linux/mktexlsr index 57308fb1f96..75f261643bc 100755 --- a/Master/bin/powerpc-linux/mktexlsr +++ b/Master/bin/powerpc-linux/mktexlsr @@ -11,7 +11,7 @@ # <te@dbs.uni-hannover.de>, Okt., 1994. # Public domain. -version='$Id: mktexlsr 22888 2011-06-09 18:05:15Z karl $' +version='$Id: mktexlsr 19613 2010-09-08 22:02:12Z karl $' progname=`echo $0 | sed 's%.*/%%'` usage="Usage: $progname [OPTION]... [DIR]... @@ -66,10 +66,6 @@ if tty -s; then verbose=true; else verbose=false; fi dry_run=false trees= -treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.tmp" -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - # A copy of some stuff from mktex.opt, so we can run in the presence of # terminally damaged ls-R files. while test $# -gt 0; do @@ -90,23 +86,11 @@ while test $# -gt 0; do elif test "x$1" = x--; then : elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 + echo "$progname: unknown option $1, try --help if you need it." >&2 exit 1 else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) + test -d "$1" || echo "$progname: $1 not a directory." >&2 + trees="$trees $1" # don't want to update system dirs fi shift done @@ -117,19 +101,20 @@ ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' # The old string, which should continue to work. old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' +trap 'cd /; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15 + +# Get list of directories from $TEXMFDBS; eliminate duplicates. { - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` + if test -n "$trees"; then + set x $trees else + OIFS=$IFS # want just a newline + IFS=' +' set x `kpsewhich --show-path=ls-R | tr : ' ' | sort | uniq` + IFS=$OIFS fi - IFS=$saveIFS shift } @@ -171,16 +156,16 @@ for TEXMFLS_R in "$@"; do elif test -s "$db_file" \ && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 + echo "$progname: $db_file lacks magic string. Skipping..." >&2 continue fi # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } + kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission. Skipping..." >&2; continue; } db_dir_tmp="$db_dir/lsR$$.tmp" (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } + || { echo "$progname: could not create directory '$db_dir_tmp'. Skipping..." >&2; continue; } db_file_tmp="$db_dir_tmp/lsR$$.tmp" rm -f "$db_file_tmp" |