#!/bin/rc

rfork n

lst=( \
	port/aoe.h \
	port/devaoe.c \
	port/devsd.c \
	port/sd.h \
	port/sdaoe.c \
	k10/ahci.h \
	k10/sdahci.c \
	k10/sdide.c \
	port/led.c \
	port/led.h \
	port/sdatafis.c \
	port/sdfis.h \
	port/sdscsifis.c \
)

uri=ftp://quanstro.net/other/nixsrc.tbz
tar=/mnt/term/home/djc/src/nixsrc.tbz
hg=/mnt/term/home/djc/src/nix-os

if(! test -f $tar)
	hget $uri > $tar

cd /tmp
tar zxf $tar

for(i in $lst) {
	cp /tmp/nix/$i $hg/sys/src/nix/$i
}