: create commands in cmd4
echo 
echo cmd4
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 ../cmd4
if x$1 = x goto all
goto $1
: all
= a all
: passwd
echo /usr/bin/passwd
as passwd.s
ld -s a.out -l
mv -f a.out /usr/bin/passwd
chmod 4755 /usr/bin/passwd
chown root /usr/bin/passwd
if x$a = x exit
: pfe
echo /usr/bin/pfe
as pfe.s
strip a.out
mv -f a.out /usr/bin/pfe
chmod 755 /usr/bin/pfe
chown bin /usr/bin/pfe
if x$a = x exit
: pr
echo /bin/pr
cc -s -O pr.c
mv -f a.out /bin/pr
chmod 755 /bin/pr
chown bin /bin/pr
if x$a = x exit
: prof
echo /usr/bin/prof
cc -s -O prof.c
mv -f a.out /usr/bin/prof
chmod 755 /usr/bin/prof
chown bin /usr/bin/prof
if x$a = x exit
: ps
echo /bin/ps
cc -s -O -I/usr/source/head ps.c
mv -f a.out /bin/ps
chmod 755 /bin/ps
chown bin /bin/ps
if x$a = x exit
: ptx
echo /usr/bin/ptx
cc -s -O ptx.c
mv -f a.out /usr/bin/ptx
chmod 755 /usr/bin/ptx
chown bin /usr/bin/ptx
if x$a = x exit
: pwd
echo /bin/pwd
cc -s -O pwd.c
mv -f a.out /bin/pwd
chmod 755 /bin/pwd
chown bin /bin/pwd
if x$a = x exit
: reloc
echo /usr/bin/reloc
cc -s -O reloc.c
mv -f a.out /usr/bin/reloc
chmod 755 /usr/bin/reloc
chown bin /usr/bin/reloc
if x$a = x exit
: restor
echo /bin/restor
cc -s -O restor.c
mv -f a.out /bin/restor
chmod 755 /bin/restor
chown bin /bin/restor
if x$a = x exit
: rew
echo /bin/rew
as rew.s
strip a.out
mv -f a.out /bin/rew
chmod 755 /bin/rew
chown bin /bin/rew
if x$a = x exit
: rm
echo /bin/rm
cc -s -O rm.c
mv -f a.out /bin/rm
chmod 755 /bin/rm
chown bin /bin/rm
if x$a = x exit
: rmdir
echo /bin/rmdir
as rmdir.s
strip a.out
mv -f a.out /bin/rmdir
chmod 4755 /bin/rmdir
chown root /bin/rmdir
