]> git.ipfire.org Git - thirdparty/openssl.git/blame - util/mklink.sh
Change #include filenames from <foo.h> to <openssl.h>.
[thirdparty/openssl.git] / util / mklink.sh
CommitLineData
d02b48c6
RE
1#!/bin/sh
2#
3# A bit of an ugly shell script used to actually 'link' files.
4# Used by 'make links'
5#
6
7PATH=$PATH:.:util:../util:../../util
8export PATH
9
10from=$1
11shift
12
13here=`pwd`
14tmp=`dirname $from`
ec577822
BM
15prefix='..'
16
17while [ `basename $tmp`x != ..x -a `basename $tmp`x != .x ]
18do
19 prefix=../$prefix
20 tmp=`dirname $tmp`
21done
22
23to=''
d02b48c6
RE
24while [ "$tmp"x != "x" -a "$tmp"x != ".x" ]
25do
26 t=`basename $here`
27 here=`dirname $here`
28 to="/$t$to"
29 tmp=`dirname $tmp`
30done
ec577822 31to=$prefix$to
d02b48c6 32
d02b48c6
RE
33if [ "$*"x != "x" ]; then
34 for i in $*
35 do
bb8f3c58
RE
36 rm -f $from/$i
37 ln -s $to/$i $from/$i
38 echo "$i => $from/$i"
d02b48c6
RE
39 done
40fi
41exit 0;