Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
 
3
files=()
4
dest=()
5
 
6
if(~ $#* 0){
7
	echo usage: B file ... >[1=2]
8
	exit usage
9
}
10
 
11
for(i)
12
	switch($i){
13
	case /*
14
		files = ( $files $i )
15
	case *
16
		files = ( $files `{cleanname `{pwd}^/$i} )
17
	}
18
 
19
 
20
if(test -f /mnt/plumb/edit || test -f /mnt/term/mnt/plumb/edit){
21
	plumb -s B -d edit $files
22
	exit
23
}
24
 
25
# using sam srv file
26
 
27
if(test -f /mnt/term/srv/sam.$user) dest = /mnt/term/srv/sam.$user
28
if not if(test -f /srv/sam.$user) dest = /srv/sam.$user
29
if not {
30
	echo B: can''''t find sam server file >[1=2]
31
	exit open
32
}
33
 
34
switch($files){
35
case *:*
36
	for(i in $files)
37
		echo $i | sed 's/^/B /;s/:([0-9]+)$/\n\1/g' >> $dest
38
case *
39
	echo B $files >> $dest
40
}