aboutsummaryrefslogtreecommitdiff
path: root/bin/makenamelink
blob: 3669693a9bcd7e16fe724cc3aa0a4eb576d1a9ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh -e

test "$#" -ge 4 || { echo "makenamelink: too few arguments" 1>&2 ; exit 100 ; }

base=${1%%/}
link="$2"
real="$3"
tmp="$4"

rm -f "$tmp/$link"
ln -s "$real" "$tmp/$link"
mv -f "$tmp/$link" "$base"/