: create commands in cmd6
echo 
echo cmd6
echo must run as super user!!!

if x$1 = xfpp goto fpp
if x$1 = xnofpp goto nofpp
echo nofpp assumed
goto noshift
: nofpp
if x$1 = x goto noshift
shift
: noshift
= f -f
goto aon
: fpp
if x$1 = x goto aon
shift
: aon
chdir ../cmd6
if x$1 = x goto all
goto $1
: all
= a all
: tail
echo /usr/bin/tail
cc -s -O tail.c
mv -f a.out /usr/bin/tail
chmod 755 /usr/bin/tail
chown bin /usr/bin/tail
if x$a = x exit
: tee
echo /usr/bin/tee
cc -s -O tee.c
mv -f a.out /usr/bin/tee
chmod 755 /usr/bin/tee
chown bin /usr/bin/tee
if x$a = x exit
: telinit
echo /bin/telinit
cc -s -O telinit.c
mv -f a.out /bin/telinit
chmod 744 /bin/telinit
chown root /bin/telinit
if x$a = x exit
: time
echo /bin/time
cc -O -s -n time.c
mv -f a.out /bin/time
chmod 755 /bin/time
chown bin /bin/time
if x$a = x exit
: tr
echo /usr/bin/tr
cc -s -O tr.c 
mv -f a.out /usr/bin/tr
chmod 755 /usr/bin/tr
chown bin /usr/bin/tr
if x$a = x exit
: typo
echo /usr/bin/typo
cc -s -O typo.c 
mv -f a.out /usr/bin/typo
chmod 755 /usr/bin/typo
chown bin /usr/bin/typo
cp w2006 /usr/lib/w2006
chmod 644 /usr/lib/w2006
chown bin /usr/lib/w2006
if x$a = x exit
: umount
echo /etc/umount
cc -s -O umount.c 
mv -f a.out /etc/umount
chmod 755 /etc/umount
chown bin /etc/umount
if x$a = x exit
: uniq
echo /bin/uniq
cc -s -O uniq.c 
mv -f a.out /bin/uniq
chmod 755 /bin/uniq
chown bin /bin/uniq
if x$a = x exit
: update
echo /etc/update
as update.s
strip a.out
mv -f a.out /etc/update
chmod 755 /etc/update
chown bin /etc/update
if x$a = x exit
: wall
echo /bin/wall
cc -s -O wall.c 
mv -f a.out /bin/wall
chmod 755 /bin/wall
chown bin /bin/wall
if x$a = x exit
: wc
echo /usr/bin/wc
cc -s -O wc.c 
mv -f a.out /usr/bin/wc
chmod 755 /usr/bin/wc
chown bin /usr/bin/wc
if x$a = x exit
: who
echo /bin/who
cc -s -O who.c 
mv -f a.out /bin/who
chmod 755 /bin/who
chown bin /bin/who
if x$a = x exit
: write
echo /bin/write
cc -s -O write.c
mv -f a.out /bin/write
chmod 755 /bin/write
chown bin /bin/write
