]> git.lizzy.rs Git - plan9front.git/blobdiff - rc/bin/sysupdate
newt: remove fn f, replace with walk
[plan9front.git] / rc / bin / sysupdate
index 6d01ed0cc6281b37fa7f9f5f16812fd22ff201ca..e0420b50fe4e6a308aa962d4d24a9eb4b2a8f937 100755 (executable)
@@ -1,4 +1,17 @@
 #!/bin/rc
-
-bind -ac /dist/plan9front /
-hg pull && hg update
+rfork en
+source=https://code.9front.org/hg/plan9front
+cd /
+if(! test -d .hg)
+       bind -ac /dist/plan9front /
+while(! ~ $#* 0){
+       switch($1){
+       case -i
+               hg incoming $source
+       case *
+               echo usage: sysupdate '[-i]' >[1=2]
+               exit usage
+       }
+       shift
+}
+hg -v pull -u $source