projects
/
oweals
/
openssl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix mkerr.pl to find functions returning function pointers (thanks Ulf!)
[oweals/openssl.git]
/
util
/
mklink.sh
1
#!/bin/sh
2
#
3
# A bit of an ugly shell script used to actually 'link' files.
4
# Used by 'make links'
5
#
6
7
PATH=$PATH:.:util:../util:../../util
8
export PATH
9
10
from=$1
11
shift
12
13
here=`pwd`
14
tmp=`dirname $from`
15
prefix='..'
16
17
while [ `basename $tmp`x != ..x -a `basename $tmp`x != .x ]
18
do
19
prefix=../$prefix
20
tmp=`dirname $tmp`
21
done
22
23
to=''
24
while [ "$tmp"x != "x" -a "$tmp"x != ".x" ]
25
do
26
t=`basename $here`
27
here=`dirname $here`
28
to="/$t$to"
29
tmp=`dirname $tmp`
30
done
31
to=$prefix$to
32
33
if [ "$*"x != "x" ]; then
34
for i in $*
35
do
36
rm -f $from/$i
37
ln -s $to/$i $from/$i
38
echo "$i => $from/$i"
39
done
40
fi
41
exit 0;