diff options
author | Nikola Lečić <nikola.lecic@anthesphoria.net> | 2018-03-04 20:28:44 +0000 |
---|---|---|
committer | Nikola Lečić <nikola.lecic@anthesphoria.net> | 2018-03-04 20:28:44 +0000 |
commit | 2dedb6340c3380b7688126a87f171b181b18446e (patch) | |
tree | db956c59ede766c7acec4a894c1d8584e128cdb2 /Master/bin/amd64-freebsd/mktexlsr | |
parent | bbe1a8e21d5014d9ac0c46779d7e4b1ab1d231ab (diff) |
Initial FreeBSD binaries for TL2018 (i386/amd64), built from r46815.
git-svn-id: svn://tug.org/texlive/trunk@46816 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/amd64-freebsd/mktexlsr')
-rwxr-xr-x | Master/bin/amd64-freebsd/mktexlsr | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Master/bin/amd64-freebsd/mktexlsr b/Master/bin/amd64-freebsd/mktexlsr index 3161a5317ec..5fde39e2c2d 100755 --- a/Master/bin/amd64-freebsd/mktexlsr +++ b/Master/bin/amd64-freebsd/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 |