Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
 
3
argv0=$0
4
force=n
5
while(! ~ $#* 0 && ~ $1 -*){
6
	switch($1){
7
	case -f
8
		force=y
9
	case -s
10
		;
11
	case *
12
		echo 'usage: ln [-s] [-f] source destination' >[2=1]
13
		exit 'usage'
14
	}
15
	shift
16
}
17
 
18
 
19
if(~ $force n && test -e $2 && ! test -d $2){
20
	echo ln: $2 destination exists >[2=1]
21
	exit 'usage'
22
}
23
 
24
exec cp -gux $1 $2