USG_PG3/usr/source/rc/cmd1.rc

: create commands in cmd1
echo 
echo cmd1
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 ../cmd1
if x$1 = x goto all
goto $1
: all
= a all
: ac
echo /usr/bin/ac
cc -s -O ac.c
mv -f a.out /usr/bin/ac
chmod 755 /usr/bin/ac
chown bin /usr/bin/ac
if x$a = x exit
: accton
echo /etc/accton
cc -O -s accton.c
mv -f a.out /etc/accton
chmod 755 /etc/accton
chown bin /etc/accton
if x$a = x exit
: ar
echo /bin/ar
cc -O -s ar.c
mv -f a.out /bin/ar
chmod 755 /bin/ar
chown bin /bin/ar
if x$a = x exit
: cal
echo /usr/bin/cal
cc -s -O cal.c
mv -f a.out /usr/bin/cal
chmod 755 /usr/bin/cal
chown bin /usr/bin/cal
if x$a = x exit
: cat
echo /bin/cat
cc -s -O cat.c
mv -f a.out /bin/cat
chmod 755 /bin/cat
chown bin /bin/cat
if x$a = x exit
: cc
echo /bin/cc
cc -s -n -O cc.c
mv -f a.out /bin/cc
chmod 755 /bin/cc
chown bin /bin/cc
if x$a = x exit
: check
echo /bin/check
cc -s -O check.c
mv -f a.out /bin/check
chmod 755 /bin/check
chown bin /bin/check
if x$a = x exit
: chmod
echo /bin/chmod
cc -O -s chmod.c
mv -f a.out /bin/chmod
chmod 755 /bin/chmod
chown bin /bin/chmod
if x$a = x exit
: chown
echo /bin/chown
as chown.s
ld -s a.out -l
mv -f a.out /bin/chown
chmod 755 /bin/chown
chown bin /bin/chown
if x$a = x exit
: chroot
echo /usr/bin/chroot
cc -s -O chroot.c
mv -f a.out /usr/bin/chroot
chmod 755 /usr/bin/chroot
chown bin /usr/bin/chroot
if x$a = x exit
: clri
echo /bin/clri
as clri.s
strip a.out
mv -f a.out /bin/clri
chmod 755 /bin/clri
chown bin /bin/clri
if x$a = x exit
: col
echo /usr/bin/col
cc -O -s col.c
mv -f a.out /usr/bin/col
chmod 755 /usr/bin/col
chown bin /usr/bin/col
if x$a = x exit
: cmp
echo /bin/cmp
cc -O -s cmp.c
mv -f a.out /bin/cmp
chmod 755 /bin/cmp
chown bin /bin/cmp
if x$a = x exit
: comm
echo /usr/bin/comm
cc -s -O comm.c
mv -f a.out /usr/bin/comm
chmod 755 /usr/bin/comm
chown bin /usr/bin/comm
if x$a = x exit
: cp
echo /bin/cp
cc -s -O cp.c
mv a.out /bin/cp1
mv -f /bin/cp1 /bin/cp
chmod 755 /bin/cp
chown bin /bin/cp
if x$a = x exit
: cpall
echo /usr/bin/cpall
cc -s -O cpall.c
mv -f a.out /usr/bin/cpall
chmod 755 /usr/bin/cpall
chown bin /usr/bin/cpall
if x$a = x exit
: date
echo /bin/date
cc -O -s date.c
mv -f a.out /bin/date
chmod 4755 /bin/date
chown root /bin/date
if x$a = x exit
: dcheck
echo /bin/dcheck
cc -s -O dcheck.c
mv -f a.out /bin/dcheck
chmod 755 /bin/dcheck
chown bin /bin/dcheck
if x$a = x exit
: dd
echo /bin/dd
cc -s -O dd.c
mv -f a.out /bin/dd
chmod 755 /bin/dd
chown bin /bin/dd
if x$a = x exit
: df
echo /bin/df
cc -s -O df.c
mv -f a.out /bin/df
chmod 755 /bin/df
chown bin /bin/df
if x$a = x exit
: diff
echo /usr/bin/diff
cc -s -O diff.c
mv -f a.out /usr/bin/diff
chmod 755 /usr/bin/diff
chown bin /usr/bin/diff
if x$a = x exit
: diff3
echo /usr/bin/diff3
cc -s -O diff3.c
mv -f a.out /usr/lib/diff3
cp diff3.sh /usr/bin/diff3
chmod 755 /usr/bin/diff3 /usr/lib/diff3
chown bin /usr/bin/diff3 /usr/lib/diff3
if x$a = x exit
: dsw
echo /bin/dsw
as dsw.s
strip a.out
mv -f a.out /bin/dsw
chmod 755 /bin/dsw
chown bin /bin/dsw
if x$a = x exit
: du
echo /bin/du
as du.s
ld -s a.out -l
mv -f a.out /bin/du
chmod 755 /bin/du
chown bin /bin/du
if x$a = x exit
: dump
echo /bin/dump
cc -s -O dump.c
mv -f a.out /bin/dump
chmod 755 /bin/dump
chown bin /bin/dump
if x$a = x exit