summaryrefslogtreecommitdiff
blob: 8135fc4435fce6290ac16943f65958c6335b1d5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- inventor/doc/man/ivman/makeManDirs.old	2005-09-14 20:48:29.000000000 +0200
+++ inventor/doc/man/ivman/makeManDirs	2005-09-14 20:51:17.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/csh -f
+#!/bin/bash
 
 #
 # Prepares command line info to create a man page for the given class name
@@ -6,23 +6,22 @@
 # Usage: makeManDirs className
 #
 
-set nonomatch
-set toolDir = ../../ivman
-set className = $1
-set treeFile = $toolDir/manTree
+toolDir=../../ivman
+className=$1
+treeFile=$toolDir/manTree
 
 # Get the list of derived classes
-set classes = `grep "^$className " $treeFile`
+classes=$(grep "^$className " $treeFile)
 
 # For each class, find the directory containing the man page. Build
 # a final list from the {className,dir} pairs.
-set list = ()
-foreach class ($classes)
-    if (-e */$class.ivm) then
-	set path = `echo */$class.ivm`
-	set list = ($list $path)
-    endif
-end
+list=""
+for class in ${classes}; do
+    if [ -e */$class.ivm ]; then
+	path=$(echo */$class.ivm)
+	list="$list $path"
+    fi
+done
 
 # Print the result
 echo $list