summaryrefslogtreecommitdiff
path: root/bin/class2hxxcxx
blob: 2254f645d75a9ddc7e8940e09b9559289ff2e718 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /bin/sh
# =============================================================================
#
# = DESCRIPTION
#     Script to combine class2info and info2head and info2src.
#
# = AUTHOR(S)
#     K. Dorn
# 
# = COPYRIGHT
#     Copyright 1991 OTC LIMITED
#
# =============================================================================

OSE_HOST=

OSE_RELEASE_NAME=
export OSE_RELEASE_NAME

OSE_ROOT=${OSE_ROOT-$WRAPPER_ROOT}
export OSE_ROOT

OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME
export OSE_VERSION_ROOT

BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin"
LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/lib"}

CLASS2INFO="$BINDIR/class2info"
INFO2HEAD="$BINDIR/info2head"
INFO2SRC="$BINDIR/info2src"

#
# Error.
#
ERROR()
{
  echo "`basename $0`: $1" >&2
  shift
  while test $# != "0"
  do
    echo $1 >&2
    shift
  done
  exit 1
}

#
# Usage message.
#
USAGE()
{
  ERROR "Usage: `basename $0` files"
} 

#
# Check usage.
#
if test "$#" = "0"
then
  USAGE
fi

while test "$#" != "0" 
do
  $CLASS2INFO $1
  if test "$?" != "0"
  then
    exit 1
  fi
  file=`basename $1`
  base="`echo $file | sed -e 's/\..*$//'`"
  if test -f "$base.ci"
  then
    $INFO2SRC $base.ci 
    $INFO2HEAD $base.ci 
#    rm -f $base.ci
  fi
  shift
done