diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-06 22:52:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-06 22:52:16 +0000 |
commit | 6f23c60d38f2b753f974e3c2173c3ddd76e3b346 (patch) | |
tree | 7d3588032c55b2d488406bd999c973666199c0d0 /Master/bin/armhf-linux/mktexlsr | |
parent | 1b9f9a630e0dbc13f5af1f9f8e0153ff67f615e9 (diff) |
cjk-gs-integrate (6mar18)
git-svn-id: svn://tug.org/texlive/trunk@46862 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/armhf-linux/mktexlsr')
-rwxr-xr-x | Master/bin/armhf-linux/mktexlsr | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Master/bin/armhf-linux/mktexlsr b/Master/bin/armhf-linux/mktexlsr index 3161a5317ec..5fde39e2c2d 100755 --- a/Master/bin/armhf-linux/mktexlsr +++ b/Master/bin/armhf-linux/mktexlsr @@ -10,7 +10,7 @@ # Originally written as `texhash' by Thomas Esser, Okt., 1994. # Public domain. -version='$Id: mktexlsr 36855 2015-04-14 12:15:08Z preining $' +version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' progname=`echo $0 | sed 's%.*/%%'` usage="Usage: $progname [OPTION]... [DIR]... @@ -73,7 +73,18 @@ if tty -s; then verbose=true; else verbose=false; fi dry_run=false trees= -treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.tmp" +# initialize treefile by either mktemp or some random name +# code taken from pdfjam and adjusted +{ + treefile=` + (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null + ` && test -n "$treefile" && test -f "$treefile" +} || { + ## We'll use awk to make random number, for portability + random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` + treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" +} || exit $? + trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15 |