|
|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U b
Length: 3478 (0xd96)
Types: TextFile
Notes: UNIX file
Names: »bldorder«
└─⟦b1d6695d7⟧ Bits:30004155/sitdisk.imd SW95713I 386/ix Software Development System Rel. 2.0
└─⟦b1d6695d7⟧ UNIX Filesystem
└─⟦this⟧ »sitls/new/usr/subsets/tools/bldorder«
#
# Copyrighted as an unpublished work.
# (c) Copyright 1987 INTERACTIVE Systems Corporation
# All rights reserved.
#
# RESTRICTED RIGHTS
#
# These programs are supplied under a license. They may be used,
# disclosed, and/or copied only as permitted under such license
# agreement. Any copy must contain the above copyright notice and
# this restricted rights notice. Use, copying, and/or disclosure
# of the programs is strictly prohibited unless otherwise provided
# in the license agreement.
#
#ident "@(#)bldorder.sh 2.4 - 88/09/02"
pkg=$1
nbr=1
file=FILES.$nbr
export dir pkg nbr file
tsize=0
nfiles=0
rm -f FILES.[0-9]* SIZE.* drivers
DISKSIZE=2000
if [ -n "$ROOT" ]
then
eval "sed <FILELIST.$pkg -e 's!^!$ROOT!'" | xargs ls -sd 2>/dev/null| sed -e "s! $ROOT! !" >ofl.$$
else
eval "xargs ls -sd <FILELIST.$pkg 2>/dev/null" >ofl.$$
fi
sort -b +1 -2 ofl.$$ >rofl.$$
drdir="/etc/drivers"
keep=
cat rofl.$$ | {
while true
do
if [ -z "$keep" ]
then
if read size name
then :
else break
fi
fi
# [ -z "$size" ] && continue
driver=`expr "$name" : "$drdir/"`
nname=$name
nsize=$size
nfiles=`expr "$nfiles" + 1`
keep=
cycle=0
if [ "$driver" -gt 0 ]
then
#find the driver directory
while [ "$name" != "$drdir" ]
do
driver=$name
name=`dirname $name`
done
echo `basename $driver` >>drivers
while read size name
do
match=`expr "$name" : "$driver/"`
if [ "$match" -gt 0 ]
then
cycle=`expr "$cycle" + 1`
nname="$nname\n$name"
nfiles=`expr "$nfiles" + 1`
nsize=`expr "$nsize" + "$size"`
else
keep=1
break
fi
done
fi
# calculate inode size
insize=`expr \( \( "$nfiles" \* 64 \) + 511 \) / 512`
cursize=`expr "$tsize" + "$nsize" + "$insize"`
if [ "$cursize" -gt $DISKSIZE ]
then
echo $tsize >SIZE.$nbr
nbr=`expr "$nbr" + 1`
file=FILES.$nbr
tsize=0
nfiles=`expr "$cycle" + 1`
fi
echo $nname >>$file
tsize=`expr "$tsize" + "$nsize"`
done
if [ "$tsize" -gt 0 ]
then
echo $tsize >SIZE.$nbr
fi
echo $nbr >NBRDISKS
# Build the remove script
if [ -s drivers ]
then
dlist=`cat drivers`
cat <<! >Remove
CONF=/etc/conf
ERROR="An error was encountered during removing the driver, package removal \
cannot be complete"
echo "The following driver(s) is being removed:"
for dname in `echo $dlist`
do
echo "\t\$dname"
\${CONF}/bin/idcheck -p \$dname >/dev/null 2>&1
if [ \$? != 0 ]
then
if [ -f \${CONF}/pack.d/\$dname/stubs.c ]
then
\${CONF}/bin/idinstall -gs \$dname | sed -e 's/Y/N/'>System
\${CONF}/bin/idinstall -eus \$dname
\${CONF}/bin/idinstall -dopnirhclz \$dname
else
\${CONF}/bin/idinstall -d \$dname
fi
if [ \$? != 0 ]
then
echo \$ERROR
exit 1
fi
fi
done
!
fi
if [ -f unlink ]
then
cat unlink >>Remove
fi
if [ -f unsetup ]
then
cat unsetup >>Remove
fi
cat <<! >>Remove
echo "The following files are being removed:"
for i in \`cat /usr/lib/installed/Files/$pkg.name\`
do
echo \$i
rm -rf \$i >/dev/null 2>&1
done
!
# Add each directory component
for f in FILES.*
do
sort <$f | tee bo.f.$$ | while read path
do
if [ -d $ROOT$path ]
then
echo $path
else
echo `dirname $path`
fi
done | sort | uniq > bo.d.$$
while read dir
do
while [ "$dir" != "/" ]
do
echo $dir
dir=`dirname $dir`
done
done <bo.d.$$ | sort | uniq >>bo.f.$$
sort -r bo.f.$$ | uniq >$f
done
}
[ -r bo.f.$$ ] && rm -f bo.f.$$
[ -r bo.d.$$ ] && rm -f bo.d.$$
[ -r rofl.$$ ] && rm -f rofl.$$
[ -r ofl.$$ ] && rm -f ofl.$$
exit 0