summaryrefslogtreecommitdiff
path: root/Master/bin/x86_64-linuxmusl/mkindex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/bin/x86_64-linuxmusl/mkindex')
-rwxr-xr-xMaster/bin/x86_64-linuxmusl/mkindex18
1 files changed, 10 insertions, 8 deletions
diff --git a/Master/bin/x86_64-linuxmusl/mkindex b/Master/bin/x86_64-linuxmusl/mkindex
index 565f805695d..7e6c57fa196 100755
--- a/Master/bin/x86_64-linuxmusl/mkindex
+++ b/Master/bin/x86_64-linuxmusl/mkindex
@@ -1,4 +1,6 @@
#!/bin/sh
+# $Id: mkindex 52596 2019-11-01 18:11:31Z karl $
+# 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