4 # Build the Setup SDK CD image on the VxWorks host machine.
12 Q=/export/home/sue/SetupSDK
13 S=$Q/resource/mfg/setup
16 symdoc=$D/docs/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH
17 symdb=$D/windlink/sleepycat/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH
18 rm -rf $D/docs $D/windlink
19 mkdir $D/docs $D/windlink $D/windlink/sleepycat
27 # Remove the old CD directory if it is there.
29 echo "$C cannot exist."
30 echo "As root, execute 'rm -rf $C'"
31 echo "and then rerun the script"
36 # Check for absolute pathnames in the project files.
37 # That is bad, but Tornado insists on putting them in
38 # whenever you add new files.
41 f=`find $B/build_vxworks -name \*.wpj -print`
43 grep -l -- "$B" $i >> $t
46 echo "The following files contain absolute pathnames."
47 echo "They must be fixed before building the CD image:"
53 # NOTE: We reuse the same sed script over several files.
55 cat <<ENDOFSEDTEXT > $s
56 s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/g
57 s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/g
58 s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/g
63 (sed -f $s $D/vx_setup.in) > $t
64 (echo "Building $f" && rm -f $f && cp $t $f)
67 (sed -f $s $D/README.in) > $t
68 (echo "Building $f" && rm -f $f && cp $t $f)
71 (sed -f $s $D/CONFIG.in) > $t
72 (echo "Building $f" && rm -f $f && cp $t $f)
75 (sed -f $s $D/vx_demofile.in) > $t
76 (echo "Building $f" && rm -f $f && cp $t $f)
78 # Copy files into the SetupSDK area.
79 (cd $D && cp README.TXT $S)
80 (cd $D && cp LICENSE.TXT $S)
81 (cd $D && cp CONFIG.TCL $S/RESOURCE/TCL)
82 (cd $D && cp SETUP.BMP $S/RESOURCE/BITMAPS)
85 # NOTE: The contents of LIB must be on one, long, single line.
86 # Even preserving it with a \ doesn't work for htmlBook.
89 (echo "Building $f" && rm -f $f)
90 cat <<ENDOFLIBTEXT >> $f
91 {BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH} {Berkeley DB} {<b>BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH</b>} {<b><a href="./index.html">BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH</a></b>} {BerkeleyDB} {} {} {}
95 # Start generating the file list.
99 # Just put everything into the image. But we only want to find regular
100 # files; we cannot have all the directories listed too.
102 # NOTE: This find is overly aggressive in getting files, particularly
103 # for the 'windlink/sleepycat' files. We actually end up with 3 sets of the
104 # documentation, the "real" ones in 'docs/BerkeleyDB*', the set found
105 # via 'windlink/sleepycat/Berk*/docs' and the one found via our symlink in
106 # 'windlink/sleepycat/Berk*/dist/vx_setup/docs/Berk*'.
108 # However, we waste a little disk space so that the expression below
109 # is trivial and we don't have to maintain it as new files/directories
112 (cd $D && find docs/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH/ -follow -name \* -type f -print) > $t
113 (cd $D && find windlink/sleepycat/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH/ -follow -name docs -prune -o -type f -print) >> $t
114 (echo "Building $f" && rm -f $f && cp $t $f)
116 # Finally build the CD image!
118 env PATH=$Q/$W/bin:$PATH QMS_BASE=$Q WIND_HOST_TYPE=$W \
119 pool mfg -d $C -v -nokey BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR < $D/setup.pool