diff options
-rwxr-xr-x | rc/apropos (renamed from apropos) | 0 | ||||
-rwxr-xr-x | rc/def (renamed from def) | 0 | ||||
-rwxr-xr-x | rc/draw (renamed from draw) | 0 | ||||
-rwxr-xr-x | rc/here (renamed from here) | 0 | ||||
-rwxr-xr-x | rc/kwin (renamed from kwin) | 0 | ||||
-rwxr-xr-x | rc/m (renamed from m) | 0 | ||||
-rwxr-xr-x | rc/mkdircp (renamed from mkdircp) | 0 | ||||
-rwxr-xr-x | rc/mm (renamed from mm) | 0 | ||||
-rwxr-xr-x | rc/orig (renamed from orig) | 0 | ||||
-rwxr-xr-x | rc/out (renamed from out) | 0 | ||||
-rwxr-xr-x | rc/patch-backup | 24 | ||||
-rwxr-xr-x | rc/plumberr | 4 | ||||
-rwxr-xr-x | rc/riostart | 8 | ||||
-rwxr-xr-x | rc/summary (renamed from summary) | 0 | ||||
-rwxr-xr-x | rc/xp | 20 |
15 files changed, 56 insertions, 0 deletions
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 @@ -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 +} |