aboutsummaryrefslogtreecommitdiff
path: root/dist/publish
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2017-09-01 13:16:43 -0400
committerRuss Cox <rsc@swtch.com>2017-09-01 13:25:20 -0400
commita39938859387987d5aac6201600154a68fad7c40 (patch)
tree19f70a476a063279c5d7cb23ea327fba34841431 /dist/publish
parent6cb3a2b9c3cf191c613985fc893c8a88a9b6d76f (diff)
downloadplan9port-a39938859387987d5aac6201600154a68fad7c40.tar.gz
plan9port-a39938859387987d5aac6201600154a68fad7c40.tar.bz2
plan9port-a39938859387987d5aac6201600154a68fad7c40.zip
all: update site from swtch.com to 9fans.github.io
Diffstat (limited to 'dist/publish')
-rwxr-xr-xdist/publish29
1 files changed, 29 insertions, 0 deletions
diff --git a/dist/publish b/dist/publish
new file mode 100755
index 00000000..bfad7cae
--- /dev/null
+++ b/dist/publish
@@ -0,0 +1,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
+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
+}