summaryrefslogtreecommitdiff
path: root/Master/bin/mips-irix/texlinks
diff options
context:
space:
mode:
authorOlaf Weber <olaf@infovore.xs4all.nl>2008-07-17 17:34:33 +0000
committerOlaf Weber <olaf@infovore.xs4all.nl>2008-07-17 17:34:33 +0000
commit6004974d246907fa8f734c225d71d5c0ba0c2157 (patch)
tree3195a48c605eadf869c95bb89c3b9400a0cf5e5c /Master/bin/mips-irix/texlinks
parent55b6390d0fab9ddc5918cb45f0ada0fb4824e201 (diff)
Updated IRIX binaries.
git-svn-id: svn://tug.org/texlive/trunk@9634 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/mips-irix/texlinks')
-rwxr-xr-xMaster/bin/mips-irix/texlinks79
1 files changed, 53 insertions, 26 deletions
diff --git a/Master/bin/mips-irix/texlinks b/Master/bin/mips-irix/texlinks
index f84f55a95bd..d8e51550924 100755
--- a/Master/bin/mips-irix/texlinks
+++ b/Master/bin/mips-irix/texlinks
@@ -6,11 +6,15 @@
# the lines given in fmtutil.cnf.
# History:
+# (Further changes in ChangeLog.)
+# Tue Oct 9 14:23:01 BST 2007
+# Added unlink option (-u) to aid OpenBSD package uninstall
+# Edd Barrett <vext01@gmail.com>
# Sun Aug 28 21:41:06 CEST 2005
# remove special cases for csplain,cslatex,pdfcslatex,pdfcsplain
# Fr Apr 8 19:15:05 CEST 2005
# cleanup now has an argument for the return code
-# So Mär 27 18:52:06 CEST 2005
+# So Mar 27 18:52:06 CEST 2005
# honor $TMPDIR, $TEMP and $TMP, not just $TMP
# Mon May 10 20:52:48 CEST 2004
# kpseaccess instead of access
@@ -35,33 +39,30 @@ export PATH
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
cnf=fmtutil.cnf # name of the config file
-version=1169050907 # seconds since `00:00:00 1970-01-01 UTC'
- # date '+%s' (with GNU date)
+version=20080528.1847 # utc timestamp
progname=texlinks
-usage='texlinks [options] [directories]
+usage='Usage: texlinks [OPTION]... [DIRECTORY]...
Create symbolic links format -> engine according to fmtutil setup.
-Valid options:
- --help
- -h show this help text
- --version show version string
- --cnffile file
- -f file use file as config file (default: fmtutil.cnf)
- --verbose
- -v set verbose mode on (default: off)
- --multiplatform
- -m operate in all platform specific directories
+Mandatory arguments to long options are mandatory for short options too.
+ -h, --help show this help text
+ --version show version string
+ -f, --cnffile FILE use FILE as config file (default: fmtutil.cnf)
+ -v, --verbose enable verbose messages (default: off)
+ -m, --multiplatform operate in all platform specific directories
(default: operate only in directory for this platform)
- --silent
- -s silently skip over existing scripts / binaries
- instead of creating a warning
+ -s, --silent silently skip existing scripts / binaries
+ (default: issue warning)
+ -u, --unlink remove symlinks created by texlinks
-directories is an optional list of directories in which to operate.
-If no directories are specified the list of directories depends on the
---multiplatform option.
-'
+The DIRECTORY arguments are an optional list of directories in which to
+operate. If no directories are specified and --multiplatform is
+likewise not specified, the directory of this script itself is used.
+With --multiplatform, all child dirs of an upper-level bin/ dir are used.
+
+Report bugs to tex-k@tug.org.'
###############################################################################
# abort(errmsg)
@@ -140,7 +141,7 @@ install_link()
fi
if test -f $selfautoloc/mf && test -f $selfautoloc/mf-nowin; then
# have both mf and mf-nowin binaries. no link.
- verbose_echo "metafont symlink $src -> $dest skipped (special case)"
+ verbose_echo "skipped metafont symlink $src -> $dest (special case)"
return
fi
fi
@@ -148,8 +149,9 @@ install_link()
esac
case $src in
- */cont-??|*/metafun|*/mptopdf)
- verbose_echo "symlink $src -> $dest skipped (special case)"
+ */cont-??|*/mptopdf)
+ # context includes wrapper scripts that create/run these.
+ verbose_echo "skipped ConTeXtish symlink $src -> $dest (special case)"
;;
*)
test "x$src" != "x`(ls -ld $src | awk '{print $NF}') 2>/dev/null`" &&
@@ -205,6 +207,24 @@ upd_symlinkdir()
}
###############################################################################
+# rm_link()
+# Delete a previously installed link
+###############################################################################
+rm_link()
+{
+ link=$1;
+ if test -e $link; then
+ if test -h $link; then
+ verbose_do rm -Rf $link
+ else
+ verbose_echo "kept $link, since not a symlink"
+ fi
+ else
+ verbose_echo "skipped $link, non-existent"
+ fi
+}
+
+###############################################################################
# main()
# parse commandline arguments, initialize variables,
# switch into temp. direcrory, execute desired command
@@ -217,6 +237,7 @@ main()
multiplatform=false
verbose=false
+ unlink=false
silent=false
thisdir=`pwd`
: ${KPSE_DOT=$thisdir}; export KPSE_DOT
@@ -232,6 +253,7 @@ main()
--v*|-v) verbose=true;;
--s*|-s) silent=true;;
--m*|-m) multiplatform=true;;
+ --u*|-u) unlink=true;;
-*) errmsg "fmtutil: unknown option \`$1' ignored.";;
*) break;;
esac
@@ -278,9 +300,14 @@ main()
test "x$fmt" = "x$engine" && continue
if test -f "$d/$engine"; then
- install_link "$engine" "$d/$fmt"
+ case $unlink in
+ true)
+ rm_link "$d/$fmt";;
+ *)
+ install_link "$engine" "$d/$fmt";;
+ esac
else
- verbose_echo "$d/$engine: engine does not exist. Skipping..."
+ verbose_echo "skipped $d/$engine, engine does not exist"
fi
# restore positional arguments: