summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-07-05 15:23:13 -0700
committerjimw@mysql.com <>2005-07-05 15:23:13 -0700
commit2669b86612a0de9d8583434839786b4c26d2d8cf (patch)
tree8c64e4587ea98702778dca068bd5159cdb53c5be /scripts
parent81cf9394bfee5cae866743afcc97b6d3dee782d5 (diff)
parentac8f9d386412e1893e9e8f20aa821fa75ad78a2b (diff)
downloadmariadb-git-2669b86612a0de9d8583434839786b4c26d2d8cf.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_config.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index a5c8af5ecb2..16e50c044ca 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -60,11 +60,19 @@ fix_path ()
get_full_path ()
{
- case $1 in
- /*) echo "$1";;
- ./*) tmp=`pwd`/$1; echo $tmp | sed -e 's;/\./;/;' ;;
- *) which $1 ;;
- esac
+ file=$1
+
+ # if the file is a symlink, try to resolve it
+ if [ -h $file ];
+ then
+ file=`ls -l $file | awk '{ print $NF }'`
+ fi
+
+ case $file in
+ /*) echo "$file";;
+ */*) tmp=`pwd`/$file; echo $tmp | sed -e 's;/\./;/;' ;;
+ *) which $file ;;
+ esac
}
me=`get_full_path $0`