From 9e10d7aef69ef9c5c5765a071927c67b741e6023 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 1 Nov 2019 18:11:31 +0000 Subject: "quote" file arguments in shell script git-svn-id: svn://tug.org/texlive/trunk@52596 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/makeindexk/ChangeLog | 6 ++++++ Build/source/texk/makeindexk/mkindex | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Build/source/texk/makeindexk/ChangeLog b/Build/source/texk/makeindexk/ChangeLog index 5416765082f..f722fb766ad 100644 --- a/Build/source/texk/makeindexk/ChangeLog +++ b/Build/source/texk/makeindexk/ChangeLog @@ -1,3 +1,9 @@ +2019-11-01 Karl Berry + + * mkindex: "quote" arguments, doc tweaks. + (Really testing update of arch-specific packages with versioned + containers with meaningless changes.) + 2019-03-21 Karl Berry * mkind.h (ARGUMENT_MAX): increase to 10240 from 1024, diff --git a/Build/source/texk/makeindexk/mkindex b/Build/source/texk/makeindexk/mkindex index 565f805695d..60a237beb54 100755 --- a/Build/source/texk/makeindexk/mkindex +++ b/Build/source/texk/makeindexk/mkindex @@ -1,4 +1,6 @@ #!/bin/sh +# $Id$ +# Public domain. Originally written by Thomas Esser around 2001.. test -f /bin/sh5 && test -z "$RUNNING_SH5" \ && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ @@ -13,7 +15,7 @@ unset RUNNING_BSH progname=`basename $0` case $# in 0) - echo "usage: `basename $0` file[.idx] ..." 1>&2 + echo "Usage: `basename $0` file[.idx|.glo] ..." 1>&2 exit 1 ;; esac @@ -27,13 +29,13 @@ dir=`pwd` # loop over all files for i do - destdir=`echo $i | sed 's/^[^\/]*$/./; s/\/[^\/]*$//'` - test -d "$destdir"||continue - cd "$destdir" - FILENAME=`basename $i .idx` + destdir=`echo "$i" | sed 's/^[^\/]*$/./; s/\/[^\/]*$//'` + test -d "$destdir" || continue + cd "$destdir" || exit 1 + FILENAME=`basename "$i" .idx` test -f "$FILENAME".idx \ - && makeindex -s $gind "$FILENAME" + && makeindex -s "$gind" "$FILENAME" test -f "$FILENAME".glo \ - && makeindex -s $gglo -o "$FILENAME".gls "$FILENAME".glo - cd "$dir" + && makeindex -s "$gglo" -o "$FILENAME".gls "$FILENAME".glo + cd "$dir" || exit 1 done -- cgit v1.2.3