#!/bin/rc

cmd=/sys/src/cmd
dst=cmd

test -d $dst || mkdir -p $dst

win=(ps mv.c test.c ls.c chprio.c who.c df.c time.c)

files=(cat.c cp.c wc.c basename.c tail.c tar.c cmp.c rm.c date.c mkdir.c pwd.c echo.c uniq.c du.c sleep.c comm.c tr.c sort.c ed.c cal.c dd.c read.c sed.c test.c tee.c time.c xd.c yacc.c)

dirs=(grep diff hoc awk)

for(f in $files)
	cp $cmd/$f $dst

for(d in $dirs){
	test -f $dst/$d || mkdir -p $dst/$d
	cp $cmd/$d/*.[chly] $dst/$d
}

