openssl/util/mklink.sh
Ralf S. Engelschall bb8f3c5879 General source tree makefile cleanups: Made `making xxx in yyy...' display
consistent in the source tree and replaced `/bin/rm' by `rm'.  Additonally
cleaned up the `make links' target: Remove unnecessary semicolons, subsequent
redundant removes, inline point.sh into mklink.sh to speed processing and no
longer clutter the display with confusing stuff. Instead only the actually
done links are displayed.
1999-03-06 12:32:06 +00:00

33 lines
459 B
Bash
Executable File

#!/bin/sh
#
# A bit of an ugly shell script used to actually 'link' files.
# Used by 'make links'
#
PATH=$PATH:.:util:../util:../../util
export PATH
from=$1
shift
here=`pwd`
tmp=`dirname $from`
while [ "$tmp"x != "x" -a "$tmp"x != ".x" ]
do
t=`basename $here`
here=`dirname $here`
to="/$t$to"
tmp=`dirname $tmp`
done
to=..$to
if [ "$*"x != "x" ]; then
for i in $*
do
rm -f $from/$i
ln -s $to/$i $from/$i
echo "$i => $from/$i"
done
fi
exit 0;