aboutsummaryrefslogtreecommitdiff
path: root/dist/publish
blob: a9b50b88f0a07b78af59945f4eec97c137392c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/local/plan9/bin/rc

dir=$9fansweb
if (~ $#dir 0) {
	dir=$home^/pub/9fans.github.io
	9fansweb=$dir
}

root=$dir/plan9port
if (! test -d $root) {
	echo $root does not exist >[1=2]
	exit bad
}

rm -rf $root/man
cp -a ../man $root/man
mkdir -p $root/unix
cp unix.html $root/unix/index.html
cp main.html $root/index.html
cp ss.html $root/screenshots/index.html
@{cd ../unix/man && mk push}
@{cd ../unix && mk push}

rm -rf $root/../usr/local/plan9
mkdir -p $root/../usr/local/plan9
@{cd ..; git archive HEAD} | @{cd $root/../usr/local/plan9 && u tar xf -}
for(d in `{find $root/../usr/local/plan9 -type d}) {
	9 rc ./mkdirlist $d `{echo $d | sed 's;.*/usr;/usr;'} >t1 && mv t1 $d/index.html
}