summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-31 14:14:05 +0000
committerJohn Ankarström <john@ankarstrom.se>2021-01-31 14:14:05 +0000
commitd325d2226cf55b63037dc62cefb7fa952d770d50 (patch)
tree9b88c71dc9a286cb8f9a4c0f40d42b7f55de5f38
parent01d70ec025ac617b1f74a7c8ccb2ed8bc120ca59 (diff)
downloadplan9-d325d2226cf55b63037dc62cefb7fa952d770d50.tar.gz
Bind $home/bin/rc to rc/ instead of ./
-rwxr-xr-xrc/apropos (renamed from apropos)0
-rwxr-xr-xrc/def (renamed from def)0
-rwxr-xr-xrc/draw (renamed from draw)0
-rwxr-xr-xrc/here (renamed from here)0
-rwxr-xr-xrc/kwin (renamed from kwin)0
-rwxr-xr-xrc/m (renamed from m)0
-rwxr-xr-xrc/mkdircp (renamed from mkdircp)0
-rwxr-xr-xrc/mm (renamed from mm)0
-rwxr-xr-xrc/orig (renamed from orig)0
-rwxr-xr-xrc/out (renamed from out)0
-rwxr-xr-xrc/patch-backup24
-rwxr-xr-xrc/plumberr4
-rwxr-xr-xrc/riostart8
-rwxr-xr-xrc/summary (renamed from summary)0
-rwxr-xr-xrc/xp20
15 files changed, 56 insertions, 0 deletions
diff --git a/apropos b/rc/apropos
index a0a5c31..a0a5c31 100755
--- a/apropos
+++ b/rc/apropos
diff --git a/def b/rc/def
index 09a3f0c..09a3f0c 100755
--- a/def
+++ b/rc/def
diff --git a/draw b/rc/draw
index f450741..f450741 100755
--- a/draw
+++ b/rc/draw
diff --git a/here b/rc/here
index c8199e8..c8199e8 100755
--- a/here
+++ b/rc/here
diff --git a/kwin b/rc/kwin
index 2448503..2448503 100755
--- a/kwin
+++ b/rc/kwin
diff --git a/m b/rc/m
index 1da3add..1da3add 100755
--- a/m
+++ b/rc/m
diff --git a/mkdircp b/rc/mkdircp
index 2236f24..2236f24 100755
--- a/mkdircp
+++ b/rc/mkdircp
diff --git a/mm b/rc/mm
index a0aaca7..a0aaca7 100755
--- a/mm
+++ b/rc/mm
diff --git a/orig b/rc/orig
index df991ff..df991ff 100755
--- a/orig
+++ b/rc/orig
diff --git a/out b/rc/out
index 71fb5f0..71fb5f0 100755
--- a/out
+++ b/rc/out
diff --git a/rc/patch-backup b/rc/patch-backup
new file mode 100755
index 0000000..55d852e
--- /dev/null
+++ b/rc/patch-backup
@@ -0,0 +1,24 @@
+#!/bin/rc -e
+
+if(! test -d /n/sources/patch){
+ rfork n
+ 9fs sources
+}
+
+rsys=`{ndb/query ipnet plan9 cifs}
+if(! test -d /n/$rsys/misc){
+ if(ip/ping -n 1 '$cifs' >/dev/null){
+ rfork n
+ cifs -m /n/$rsys '$cifs'
+ }
+ if not{
+ echo $rsys not available >[1=2]
+ exit 'destination not available'
+ }
+}
+
+if(! test -d /n/$rsys/misc/9patch)
+ mkdir /n/$rsys/misc/9patch
+
+echo dircp /n/sources/patch /n/$rsys/misc/9patch
+exec dircp /n/sources/patch /n/$rsys/misc/9patch
diff --git a/rc/plumberr b/rc/plumberr
new file mode 100755
index 0000000..8f142be
--- /dev/null
+++ b/rc/plumberr
@@ -0,0 +1,4 @@
+#!/bin/rc -e
+cat > /tmp/plumberr
+if(! ~ `{ls -l /tmp/plumberr | awk '{print $6}'} 0)
+ B /tmp/plumberr
diff --git a/rc/riostart b/rc/riostart
new file mode 100755
index 0000000..9812b84
--- /dev/null
+++ b/rc/riostart
@@ -0,0 +1,8 @@
+#!/bin/rc
+window 0,224,161,347 winwatch -r 1000 -e '^(winwatch|stats|errors)'
+window 0,113,161,230 kwin
+window 0,0,161,117 stats -lmisce
+window -miny 130
+
+# run a system shell on the serial console
+~ $#console 0 || window -scroll console
diff --git a/summary b/rc/summary
index b527afd..b527afd 100755
--- a/summary
+++ b/rc/summary
diff --git a/rc/xp b/rc/xp
new file mode 100755
index 0000000..07c637f
--- /dev/null
+++ b/rc/xp
@@ -0,0 +1,20 @@
+#!/bin/rc -e
+
+# xp -- safer and more useful cp
+# for copying directories, use dxp (or perhaps -r?)
+
+flagfmt='t directory'
+args='files ... | from to'
+if(! ifs=() eval `{aux/getflags $*} || ~ $#* 0){
+ aux/usage
+ exit usage
+}
+
+if(~ $flagt '') {
+ if(! ~ $#* 2){
+ echo must be two arguments only without -t >[1=2]
+ aux/usage
+ exit usage
+ }
+ exec cp $1 $2
+}