67 |
TOOLDIR=$BINDIR |
TOOLDIR=$BINDIR |
68 |
|
|
69 |
# |
# |
70 |
|
# A temporary file for post-editing the pathconfig file... |
71 |
|
# |
72 |
|
PCEDITTMP=/usr/tmp/pcedittmp.$$ |
73 |
|
|
74 |
|
# |
75 |
# files to be deleted after we are done... |
# files to be deleted after we are done... |
76 |
# |
# |
77 |
tmpfiles="" |
tmpfiles="" |
79 |
tmpfiles="$tmpfiles $LIBLIST" |
tmpfiles="$tmpfiles $LIBLIST" |
80 |
tmpfiles="$tmpfiles $LOCALPATHCONFIG" |
tmpfiles="$tmpfiles $LOCALPATHCONFIG" |
81 |
tmpfiles="$tmpfiles $LIBMOVESCRIPT" |
tmpfiles="$tmpfiles $LIBMOVESCRIPT" |
82 |
|
tmpfiles="$tmpfiles $PCEDITTMP" |
83 |
# |
# |
84 |
# make sure we always clean up after ourselves... |
# make sure we always clean up after ourselves... |
85 |
# |
# |
340 |
reglib() { |
reglib() { |
341 |
if [ x$MOVE_LIBRARIES = xtrue ] ; then |
if [ x$MOVE_LIBRARIES = xtrue ] ; then |
342 |
FINALLOCATION=$LIBDIR/$1 |
FINALLOCATION=$LIBDIR/$1 |
343 |
|
FINALCONFIGPATH=$1 |
344 |
else |
else |
345 |
FINALLOCATION=$SRCDIR/$2 |
FINALLOCATION=$SRCDIR/$2 |
346 |
|
FINALCONFIGPATH=$FINALLOCATION |
347 |
fi |
fi |
348 |
if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then |
if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then |
349 |
echo "$this: Library $1 already exists in $FINALLOCATION." |
echo "$this: Library $1 already exists in $FINALLOCATION." |
354 |
if [ x$MOVE_LIBRARIES = xtrue ] ; then |
if [ x$MOVE_LIBRARIES = xtrue ] ; then |
355 |
echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT |
echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT |
356 |
fi |
fi |
|
echo $1 $FINALLOCATION >>$CM_PATHCONFIG_DEFAULT |
|
357 |
fi |
fi |
358 |
|
echo $1 $FINALCONFIGPATH >>$CM_PATHCONFIG_DEFAULT |
359 |
} |
} |
360 |
|
|
361 |
# |
# |
652 |
fi |
fi |
653 |
|
|
654 |
# |
# |
655 |
# Finally, move the libraries to their final locations... |
# Move the libraries to their final locations... |
656 |
# |
# |
657 |
|
|
658 |
if [ -r $LIBMOVESCRIPT ] ; then |
if [ -r $LIBMOVESCRIPT ] ; then |
660 |
. $LIBMOVESCRIPT |
. $LIBMOVESCRIPT |
661 |
fi |
fi |
662 |
|
|
663 |
|
# |
664 |
|
# Finally, remove duplicate entries from pathconfig file... |
665 |
|
# |
666 |
|
if [ -f $CM_PATHCONFIG_DEFAULT ] ; then |
667 |
|
cp $CM_PATHCONFIG_DEFAULT $PCEDITTMP |
668 |
|
rm -f $CM_PATHCONFIG_DEFAULT |
669 |
|
awk <$PCEDITTMP 'NF == 2 { mapping[$1] = $2 } |
670 |
|
NF != 2 { print $0 } |
671 |
|
END { for (i in mapping) print i, mapping[i] }' \ |
672 |
|
| sort >$CM_PATHCONFIG_DEFAULT |
673 |
|
fi |
674 |
|
|
675 |
exit 0 |
exit 0 |