1#!/bin/sh 2exit 0 3# additional links to manual entries, corresponding to the procedure 4# and command names described by the manual entry. For example, the 5# Tcl manual entry Hash.3 describes procedures Tcl_InitHashTable, 6# Tcl_CreateHashEntry, and many more. This script will make hard 7# links so that Tcl_InitHashTable.3, Tcl_CreateHashEntry.3, and so 8# on all refer to Hash.3 in the installed directory. 9# 10# Because of the length of command and procedure names, this mechanism 11# only works on machines that support file names longer than 14 characters. 12# This script checks to see if long file names are supported, and it 13# doesn't make any links if they are not. 14# 15# The script takes one argument, which is the name of the directory 16# where the manual entries have been installed. 17 18ZIP=true 19while true; do 20 case $1 in 21 -s | --symlinks ) 22 S=-s 23 ;; 24 -z | --compress ) 25 ZIP=$2 26 shift 27 ;; 28 *) break 29 ;; 30 esac 31 shift 32done 33 34if test $# != 1; then 35 echo "Usage: mkLinks <options> dir" 36 exit 1 37fi 38 39if test "x$ZIP" != "xtrue"; then 40 touch TeST 41 $ZIP TeST 42 Z=`ls TeST* | sed 's/^[^.]*//'` 43 rm -f TeST* 44fi 45 46cd $1 47echo foo > xyzzyTestingAVeryLongFileName.foo 48x=`echo xyzzyTe*` 49echo foo > xyzzyTestingaverylongfilename.foo 50y=`echo xyzzyTestingav*` 51rm xyzzyTe* 52if test "$x" != "xyzzyTestingAVeryLongFileName.foo"; then 53 exit 54fi 55if test "$y" != "xyzzyTestingaverylongfilename.foo"; then 56 CASEINSENSITIVEFS=1 57fi 58 59for man_page in igeomap.n tkgeomap.n tkgeomap_procs.n wdgeomap.n 60do 61 if test -r ${man_page} 62 then 63 rm -f ${man_page}.* 64 $ZIP ${man_page} 65 for mpg in xytolatlon latlontoxy 66 do 67 rm -f $mpg ${mpg}.* 68 ln $S ${man_page}$Z ${mpg}.n$Z 69 done 70 fi 71done 72