shithub: rc

ref: 1dce09166370ecf9cc3764fb19c91c651578529e
dir: /bin/mku/

View raw version
#!/bin/rc -xe
# (idiot) gottagofast update script
rfork en
extra=/sys/lib/extra

patches=(/usr/qwx/p/patch/^(\
	9fs-9paste\
	9nusbrc-nesusbjoy\
	doom-autorun\
	doom-chat\
	doom-limits\
	doom-mouseglitches\
	doom-mousegrab\
	doom-naivescaleup\
	doom-nodclick\
	doom-nomousemove\
	doom-skywallhit\
	doom-spy\
	doom-udpip\
	file-mod\
	file-opus\
	ircrc-jpmfix\
	ircrc-print-log\
	kbdfs-fshalt\
	libplumb-basic\
	man1audio-opus\
	man-joy\
	mothra-font\
	page-invert\
	paint-reverse\
	play-dmid-mod\
	play-opus-aac\
	png-maxmem\
	rio-exit\
	sam-ham\
	sam-sharedsnarf\
	sam-fullfrontalnudity\
	samterm-flayers\
	samterm-fullfrontalnudity\
	troff-nchars\
	vgadb-w500-w520\
	acme-col\
	kbmap-col\
	libdraw-menucol\
	colors-col\
	faces-col\
	fplot-col\
	mothra-col\
	rio-col\
	samterm-col\
	spred-col\
	stats-col\
	statusmsg-col\
	statusbar-col\
	sudoku-col\
	vt-col\
	zuke-col\
)\
	$extra/usr/sigrid/^(riow/9front.diff patches/rio-select.patch)\
)
more=(\
	$extra/usr/^(spew/aplay sigrid/imgtools sigrid/mp3dec)\
)
torevert=(\
	/lib/vgadb\
	/rc/bin/^(9fs ircrc play)\
	/sys/lib/plumb/basic\
	/sys/lib/kbmap\
	/sys/man/1/audio\
	/sys/man/4/nusb\
	/sys/src/9/pc64/mkfile\
)

{
cd /
git
git/revert $torevert
sysup
. /sys/lib/rootstub
pa4 $patches
cd /sys/src
{
	mk clean
	for(i in amd64 386 arm)
		objtype=$i mk nuke
	mkall || exit NOPE
	mk clean
	cd /usr/qwx/p
	mkall
	cp -x opl2/man/1/opl2 pplay/man/1/pplay u6/man/1/u6mopl wl3d/man/1/wl3d /sys/man/1/
	cp -x wl3d/man/6/wl3d /sys/man/6/
	cd /usr/qwx/p/qk2
	for(i in amd64 386 arm)
		objtype=$i build.rc
	for(i in $more){
		if(test -d $i){
			cd $i
			mkall
		}
	}
	stealrc
	cd /
} | pump || exit 'NOPE'
cd /sys/man
mk
k9 || exit
} >>/tmp/mku.$pid
rm /tmp/mku.$pid