plan9port/bin/9fs
Dan Cross 83b1e7a39b 9fs: remove tip (dead?), redirect sources to 9p.io
Fixes #195.

Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-16 17:22:27 +00:00

27 lines
300 B
Bash
Executable file

#!/usr/local/plan9/bin/rc
if(! ~ $#* 1){
echo 'usage: 9fs sysname'
exit usage
}
fn srv1 {
flag=()
if(~ $1 -*){
flag=$1
shift
}
if(! 9p stat $1 >/dev/null >[2=1]){
rm -f $ns/$1
srv $flag $2 $1
}
}
ns=`{namespace}
switch($1){
case sources
srv1 -n sources 9p.io
case *
srv1 $1 $1
}