diff options
author | jbj <devnull@localhost> | 2001-10-15 03:47:21 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-10-15 03:47:21 +0000 |
commit | db7110722d3317cc81dd11c104dd45ac8c328e20 (patch) | |
tree | acc2fe412f5d1f7e3d3fd35993fd3fd5cc20a7f3 /db/dist/vx_buildcd | |
parent | 033e2a186a797374caeb2295a00dee5eef202ffc (diff) | |
download | rpm-db7110722d3317cc81dd11c104dd45ac8c328e20.tar.gz rpm-db7110722d3317cc81dd11c104dd45ac8c328e20.tar.bz2 rpm-db7110722d3317cc81dd11c104dd45ac8c328e20.zip |
Initial revision
CVS patchset: 5110
CVS date: 2001/10/15 03:47:21
Diffstat (limited to 'db/dist/vx_buildcd')
-rwxr-xr-x | db/dist/vx_buildcd | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/db/dist/vx_buildcd b/db/dist/vx_buildcd new file mode 100755 index 000000000..b6135711e --- /dev/null +++ b/db/dist/vx_buildcd @@ -0,0 +1,119 @@ +#!/bin/sh +# Id: vx_buildcd,v 1.5 2001/09/11 17:09:02 sue Exp +# +# Build the Setup SDK CD image on the VxWorks host machine. + +. ./RELEASE + +B=`pwd` +B=$B/.. +D=$B/dist/vx_setup +C=$D/db.CD +Q=/export/home/sue/SetupSDK +S=$Q/resource/mfg/setup +W=sun4-solaris2 + +symdoc=$D/docs/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH +symdb=$D/target/src/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH +rm -rf $D/docs $D/target +mkdir $D/docs $D/target $D/target/src +ln -s $B/docs $symdoc +ln -s $B $symdb + +s=/tmp/__db_a +t=/tmp/__db_b + +# +# Remove the old CD directory if it is there. +if test -d $C; then + echo "$C cannot exist." + echo "As root, execute 'rm -rf $C'" + echo "and then rerun the script" + exit 1 +fi + +# +# Check for absolute pathnames in the project files. +# That is bad, but Tornado insists on putting them in +# whenever you add new files. +# +rm -f $t +f=`find $B/build_vxworks -name \*.wpj -print` +for i in $f; do + grep -l -- "$B" $i >> $t +done +if test -s $t; then + echo "The following files contain absolute pathnames." + echo "They must be fixed before building the CD image:" + cat $t + exit 1 +fi + +# +# NOTE: We reuse the same sed script over several files. +# +cat <<ENDOFSEDTEXT > $s +s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/g +s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/g +s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/g +s#@DB_SETUP_DIR@#$D#g +ENDOFSEDTEXT + +f=$D/setup.pool +(sed -f $s $D/vx_setup.in) > $t + (echo "Building $f" && rm -f $f && cp $t $f) + +f=$D/README.TXT +(sed -f $s $D/README.in) > $t + (echo "Building $f" && rm -f $f && cp $t $f) + +f=$D/CONFIG.TCL +(sed -f $s $D/CONFIG.in) > $t + (echo "Building $f" && rm -f $f && cp $t $f) + +f=$D/filelist.demo +(sed -f $s $D/vx_demofile.in) > $t + (echo "Building $f" && rm -f $f && cp $t $f) + +# Copy the Sleepycat specific files into the SetupSDK area. +(cd $D && cp README.TXT $S) +(cd $D && cp LICENSE.TXT $S) +(cd $D && cp CONFIG.TCL $S/RESOURCE/TCL) +(cd $D && cp SETUP.BMP $S/RESOURCE/BITMAPS) + +# +# NOTE: The contents of LIB must be on one, long, single line. +# Even preserving it with a \ doesn't work for htmlBook. +# +f=../docs/LIB +(echo "Building $f" && rm -f $f) +cat <<ENDOFLIBTEXT >> $f +{BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH} {Sleepycat Software 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>} {Sleepycat BerkeleyDB} {} {} {} +ENDOFLIBTEXT + +# +# Start generating the file list. +f=$D/filelist.all + +# +# Just put everything into the image. But we only want to find regular +# files; we cannot have all the directories listed too. +# +# NOTE: This find is overly aggressive in getting files, particularly +# for the 'target/src' files. We actually end up with 3 sets of the +# documentation, the "real" ones in 'docs/BerkeleyDB*', the set found +# via 'target/src/Berk*/docs' and the one found via our symlink in +# 'target/src/Berk*/dist/vx_setup/docs/Berk*'. +# +# However, we waste a little disk space so that the expression below +# is trivial and we don't have to maintain it as new files/directories +# are added to DB. +# +(cd $D && find docs/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH/ -follow -name \* -type f -print) > $t +(cd $D && find target/src/BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH/ -follow -name docs -prune -o -type f -print) >> $t +(echo "Building $f" && rm -f $f && cp $t $f) +# +# Finally build the CD image! +# +env PATH=$Q/$W/bin:$PATH QMS_BASE=$Q WIND_HOST_TYPE=$W \ +pool mfg -d $C -v -nokey BerkeleyDB.$DB_VERSION_MAJOR.$DB_VERSION_MINOR < $D/setup.pool |