| 1 | #!/bin/sh |
| 2 | ##### rcsid = @(#)$Id: mksbtdx,v 1.16 2010-04-12 18:04:30 rathc Exp $ |
| 3 | ##### |
| 4 | ## |
| 5 | ## mksbtdx - Produce a songbook style .tdx file from a .tIdx file. |
| 6 | ## |
| 7 | ## Version 4.5, 30 April, 2010 |
| 8 | ## |
| 9 | ## Copyright 1992--2010 Christopher Rath <[email protected]> |
| 10 | ## |
| 11 | ## This package is free software; you can redistribute it and/or |
| 12 | ## modify it under the terms of version 2.1 of the GNU Lesser |
| 13 | ## General Public License as published by the Free Software |
| 14 | ## Foundation. |
| 15 | ## |
| 16 | ## This package is distributed in the hope that it will be |
| 17 | ## useful, but WITHOUT ANY WARRANTY; without even the implied |
| 18 | ## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 19 | ## PURPOSE. See the GNU Lesser General Public License for more |
| 20 | ## details. |
| 21 | ## |
| 22 | ## Take a .tIdx file produced by one of the songbook styles and |
| 23 | ## turn it into a .tdx file for final formatting into a title and |
| 24 | ## first line index. |
| 25 | ## |
| 26 | ##### |
| 27 | ##### |
| 28 | |
| 29 | ### |
| 30 | # Check that the proper parameters were input. |
| 31 | ### |
| 32 | if [ "$1" = "" ] |
| 33 | then |
| 34 | echo USAGE: $0 jobname |
| 35 | fi |
| 36 | |
| 37 | ### |
| 38 | # Call makeindex to do the required munging. |
| 39 | ## |
| 40 | makeindex -s songbook.ist -o $1.tdx $1.tIdx |
| 41 | |
| 42 | ### |
| 43 | # Tell the user what the new filename is. |
| 44 | ### |
| 45 | echo " " |
| 46 | echo "The new Index file is called \`$1.tdx'." |
| 47 | |
| 48 | ### |
| 49 | # End of script. |
| 50 | ### |