/usr/share/texlive/texmf-dist/web2c/mktexdir is in texlive-base 2015.20160320-1ubuntu0.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #!/bin/sh
# mkinstalldirs (now mktexdir) -- make directory hierarchy.
# Author: Noah Friedman <friedman@prep.ai.mit.edu>, created: 1993-05-16.
# Public domain.
#
# Modified for sticky directory creation, --help, --version, more,
# by Thomas Esser, Karl Berry, Olaf Weber, et al.
version='$Id: mktexdir 34656 2014-07-18 23:38:50Z karl $'
progname=`echo $0 | sed 's%.*/%%'`
# preferentially use subprograms from our own directory.
mydir=`echo "$0" | sed 's,/[^/]*$,,'`
mydir=`cd "$mydir" && pwd`
PATH="$mydir:$PATH"; export PATH
usage="Usage: $0 DIR...
Create each DIR, including any missing leading directories."
mt_max_args=$#
# Common code for all scripts.
: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
if test ! -f "$MT_MKTEX_OPT"; then
echo "$0: Cannot find mktex.opt; check your installation." >&2
exit 1
fi
. "$MT_MKTEX_OPT"
test -n "$MT_MKTEXDIR_OPT" && . "$MT_MKTEXDIR_OPT"
test -z "$MT_APPEND_MASK" && MT_APPEND_MASK="="
errstatus=0
for file
do
case $file in
/*) cd /;;
*) cd $KPSE_DOT;;
esac
OLDIFS=$IFS; IFS=/; set fnord `echo "./$file"`; IFS=$OLDIFS; shift
pathcomp=
for d
do
test -z "$d" && continue
pathcomp="$pathcomp$d"
if test ! -d "./$pathcomp"; then
mkdir "./$pathcomp" || { errstatus=$?; break; }
chmod `kpsestat ${MT_APPEND_MASK} "$pathcomp"/..` "./$pathcomp"
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
|