plan9port/bin/9fs

28 lines
300 B
Text
Raw Permalink Normal View History

2005-03-18 19:27:26 +00:00
#!/usr/local/plan9/bin/rc
if(! ~ $#* 1){
echo 'usage: 9fs sysname'
exit usage
}
fn srv1 {
2007-11-27 20:39:06 +00:00
flag=()
if(~ $1 -*){
flag=$1
shift
}
2005-03-18 19:27:26 +00:00
if(! 9p stat $1 >/dev/null >[2=1]){
rm -f $ns/$1
2007-11-27 20:39:06 +00:00
srv $flag $2 $1
2005-03-18 19:27:26 +00:00
}
}
ns=`{namespace}
switch($1){
case sources
srv1 -n sources 9p.io
2005-03-18 19:27:26 +00:00
case *
srv1 $1 $1
}