2006-07-11 18:33:40 +02:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2006-08-29 09:10:35 +02:00
|
|
|
# $Id: //poco/1.2/build/script/shlibln#1 $
|
2006-07-11 18:33:40 +02:00
|
|
|
#
|
|
|
|
# shlibln
|
|
|
|
#
|
2006-08-29 09:10:35 +02:00
|
|
|
# Create a symbolic link for a shared library
|
2006-07-11 18:33:40 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
if [ $# -ne 2 ] ; then
|
|
|
|
echo "usage: $0:t file link"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-08-29 09:10:35 +02:00
|
|
|
source="$1"
|
|
|
|
target="$2"
|
|
|
|
|
|
|
|
sourcedir=`dirname "$source"`
|
|
|
|
targetdir=`dirname "$target"`
|
|
|
|
|
|
|
|
if [ "$sourcedir" = "$targetdir" ] ; then
|
|
|
|
source=`basename $source`
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2006-07-11 18:33:40 +02:00
|
|
|
if [ "$1" != "$2" ] ; then
|
2006-08-29 09:10:35 +02:00
|
|
|
ln -sf "$source" "$target"
|
2006-07-11 18:33:40 +02:00
|
|
|
fi
|