|
|
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: 2392 (0x958)
Types: TextFile
Notes: UNIX file
Names: »bldflist«
└─⟦b1d6695d7⟧ Bits:30004155/sitdisk.imd SW95713I 386/ix Software Development System Rel. 2.0
└─⟦b1d6695d7⟧ UNIX Filesystem
└─⟦this⟧ »sitls/new/usr/subsets/tools/bldflist«
#
# 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 "@(#)bldflist.sh 2.3 - 88/10/10"
[ ! -d $ROOT/usr/options ] && mkdir -p $ROOT/usr/options
# force to absolute path
if grep "^\." FILES >/dev/null
then
cat <<\! | ed - FILES
1,$s/^\.//
w
q
!
fi
# build the link and unlink files
rm -f link unlink ONELINK DIRS NOFILES
getlinks <FILES 2>NOFILE | sort -n +0 -1 -n +1 -2 +3 -4 | \
{
odev=
onode=
opath=
while read dev node path
do
[ -z "$dev" ] && continue
if [ "$dev" -eq "$odev" -a "$node" -eq "$onode" ]
then
echo ln $opath $path >>link
echo rm $path >>unlink
nln=`expr $nln + 1`
continue
fi
[ -n "$odev" ] && [ "$nln" -eq 1 ] && echo $opath >>ONELINK
odev=$dev
onode=$node
opath=$path
nln=1
done
[ -n "$odev" ] && [ "$nln" -eq 1 ] && echo $opath >>ONELINK
}
# remove the linked files from FILES to create FILELIST
if [ -s link ]
then
cut -d" " -f3 link | sort >br.$$
cat br.$$ NOFILE | sort >br.$$.ln
sort FILES >br.$$
comm -23 br.$$ br.$$.ln >FILELIST.$1
rm br.$$ br.$$.ln
else
if [ -s NOFILE ]
then
sort NOFILE >br.$$.nf
sort FILES >br.$$
comm -23 br.$$ br.$$.nf >FILELIST.$1
rm -f br.$$ br.$$.nf
else
cp FILES FILELIST.$1
chmod 644 FILELIST.$1
fi
fi
# put drivers ahead of the filelist
drivers="/etc/drivers"
grep $drivers FILELIST.$1 | sort >br.$$.dr
grep -v $drivers FILELIST.$1 >br.$$
cat br.$$.dr br.$$ >FILELIST.$1
rm -f br.$$ br.$$.dr
# create the dirctory file
grep -v $drivers FILELIST.$1 | while read path
do
[ -z "$path" ] && continue
if [ -d $ROOT$path ]
then
echo $path
else
[ -r $ROOT$path ] && echo `dirname $path`
fi
done | sort | uniq >DIRS
if [ -s ONELINK ]
then
echo WARNING: The following files have multiple links that are not
echo in the file list:
cat ONELINK
else
rm -f ONELINK
fi
if [ -s NOFILE ]
then
echo WARNING: The following files do not exist on this system:
cat NOFILE
else
rm -f NOFILE
fi
exit 0