rootusr5_3 1.16 KB
#!/bin/ksh
#
# script to make $ROOT/usr on a 5.3 machine
#
# This script takes /usr/include, /usr/lib and makes a clone of the directory
# structure. In each directory of the cloned structure, it make symbolic links
# to all files back to the original files in $1 structure
#

# get the environment variables
. ./CHANGEME

# prompt user to make sure we don't do something bad
echo
echo
echo About to make symbolic links
echo from /usr/include/... to $ROOT/usr/include/...
echo and  /usr/lib/... to $ROOT/usr/lib/...
echo
echo If this is the correct tree, type yes to continue, no to quit
read REPLY
if test $REPLY != "yes"
then
        echo QUIT!!!
        exit 0
fi


# clean up what was there
rm -rf $ROOT/usr

LIST="/usr/include /usr/lib"

for d in $LIST;
do
	find $d -name '*' -exec $TREE_BINS/mkdir_ln $ROOT {} \;
done

LIST="libXlate.h make/4DACE1defs make/ismcommondefs make/ismcommonrules make/kcommondefs make/kcommonrules make/mandefs make/manrules make/startversion cmplrs/events.h cmplrs/leb128.h"

for f in $LIST;
do
	rm -f $ROOT/usr/include/$f; cp $PREXTRA/usr/include/$f $ROOT/usr/include/$f
done

rm -rf $ROOT/usr/lib/doc; cp -r $PREXTRA/usr/lib/doc $ROOT/usr/lib/doc