diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 17:14:36 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 17:14:36 +0300 |
commit | 2959e1ede0ebc6fdffd7b8660f43c2ce14c9696f (patch) | |
tree | f6343b1ce11a8c87251dd27cf3d3e26b50693fa7 /rc/bin/ape/ln | |
parent | e463eb40363ff4c68b1d903f4e0cdd0ac1c5977f (diff) |
Import sources from 2011-03-30 iso image - rc
Diffstat (limited to 'rc/bin/ape/ln')
-rwxr-xr-x | rc/bin/ape/ln | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/rc/bin/ape/ln b/rc/bin/ape/ln new file mode 100755 index 000000000..bb5da4a44 --- /dev/null +++ b/rc/bin/ape/ln @@ -0,0 +1,23 @@ +#!/bin/rc + +argv0=$0 +force=n +while(! ~ $#* 0 && ~ $1 -*){ + switch($1){ + case -f + force=y + case -s + ; + case * + echo 'usage: ln [-s] [-f] source destination' >[2=1] + exit 'usage' + } + shift +} + +if(~ $force n && test -e $2){ + echo ln: $2 destination exists >[2=1] + exit 'usage' +} + +exec cp -gux $1 $2 |