:	creat the UNIX os library "/usr/sys/lib1"
:	must be called with argument 70, 45 or 40
echo 
echo /usr/sys/lib1

if $1x != 40x -a $1x != 45x -a $1x != 70x \
 sh -c "echo An argument of 40, 45, or 70 is expected; exit"
chdir ../opsys
echo acct.c;	cc -c -O acct.c
echo alloc.c;	cc -c -O alloc.c
echo clock.c;	cc -c -O clock.c
echo errlog.c;	cc  -c -O errlog.c
echo fio.c;	cc -c -O fio.c
echo iget.c;	cc -c -O iget.c
echo main.c;	cc -c -O main.c
echo messag.c;	cc -c -O messag.c
echo nami.c;	cc -c -O nami.c
echo prf.c;	cc -c -O prf.c
echo rdwri.c;	cc -c -O rdwri.c
echo sig.c;	cc -c -O sig.c
echo slp.c;	cc -c -O slp.c
echo subr.c;	cc -c -O subr.c
echo sys1.c;	cc -c -O sys1.c
echo sys2.c;	cc -c -O sys2.c
echo sys3.c;	cc -c -O sys3.c
echo sys4.c;	cc -c -O sys4.c
echo sys5.c;	cc -c -O sys5.c
echo sysent.c;	cc -c -O sysent.c
echo text.c;	cc -c -O text.c
echo trap.c;	cc -c -O trap.c

ar rv /usr/sys/lib1 \
main.o \
alloc.o \
iget.o \
prf.o \
rdwri.o \
slp.o \
subr.o \
text.o \
trap.o \
sig.o \
sysent.o \
sys1.o \
sys2.o \
sys3.o \
sys4.o \
sys5.o \
nami.o \
fio.o \
messag.o \
clock.o\
acct.o\
errlog.o
rm *.o

chmod 644 /usr/sys/lib1
chown bin /usr/sys/lib1
if $1x != 40x exit
echo lib40 insert for 11/40 system
echo messagf.c;	cc -c -O messagf.c
echo errlogf.c;	cc -c -O errlogf.c
echo sysf.c; cc -c -O sys5f.c
ar rv /usr/sys/lib40 messagf.o sys5f.o errlogf.o 
rm messagf.o sys5f.o errlogf.o
exit
