123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #!/bin/rc
- # Derived from the 9legacy build scripts.
- rfork en
- fn isodate {
- smon='s/Jan/01/
- s/Feb/02/
- s/Mar/03/
- s/Apr/04/
- s/May/05/
- s/Jun/06/
- s/Jul/07/
- s/Aug/08/
- s/Sep/09/
- s/Oct/10/
- s/Nov/11/
- s/Dec/12/'
- year=`{date | sed 's/.* //'}
- mon=`{date | sed -e 's/^....(...).*/\1/' -e $smon}
- day=`{date | sed -e 's/^........(..).*/\1/'}
- if(test $day -le 9)
- day = 0$day
- echo -n $year-$mon-$day
- }
- fn buildinit {
- if (! ~ $buildinitdone yes) {
- date=`{isodate}
- #arch=(386)
- #arch=(amd64)
- #arch=(386 arm)
- arch=(386 amd64)
- #arch=(386 amd64 arm)
- #arch=(386 mips mips64 spim spim64)
- #arch=(386 amd64 arm mips mips64 power sparc)
- #arch=(386 amd64 arm mips mips64 power sparc spim spim64)
- #nvram=/dev/sdE0/nvram
- #nvram=/mnt/term/home/djc/work/rpi/nvram
- if(~ $target '')
- target=plan9
- build=/n/harvey
- dir=/n/harvey/build
- path=(/bin $dir .)
- outputdir=/n/host
- rdev=/dev/sdD0
- buildinitdone=yes
- }
- }
- fn quitonfailure {
- if (! ~ $1 '' 0 '|')
- exit $1
- }
- buildinit
|