diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-01 18:11:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-01 18:11:31 +0000 |
commit | 9e10d7aef69ef9c5c5765a071927c67b741e6023 (patch) | |
tree | bba52f2c412d76d16c14282e53bcd78c26bb397f /Build/source | |
parent | 98cc380520f4e8bcf8129cf2866090a545f5ae7d (diff) |
"quote" file arguments in shell script
git-svn-id: svn://tug.org/texlive/trunk@52596 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/makeindexk/ChangeLog | 6 | ||||
-rwxr-xr-x | 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 <karl@tug.org> + + * mkindex: "quote" arguments, doc tweaks. + (Really testing update of arch-specific packages with versioned + containers with meaningless changes.) + 2019-03-21 Karl Berry <karl@tug.org> * 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 |