View | Details | Raw Unified | Return to bug 197542
Collapse All | Expand All

(-)/usr/ports/Mk/Scripts/find-lib.sh 2015-02-11 13:19:51.000000000 -0500 (-15 / +23 lines)
Lines 15-37 Link Here
15
dirs="${LIB_DIRS} `cat ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || :`"
15
dirs="${LIB_DIRS} `cat ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || :`"
16
resolv_symlink() {
16
resolv_symlink() {
17
       local file tgt
17
       local file tgt count
18
       file=${1}
18
       file=${1}
19
       if [ ! -L ${file} ] ; then
19
       count=0
20
               echo ${file}
21
               return
22
       fi
23
24
       tgt=`readlink ${file}`
25
       case $tgt in
26
       /*)
27
               echo $tgt
28
               return
29
               ;;
30
       esac
31
       file=${file%/*}/${tgt}
20
       while [ -L ${file} ]
32
       absolute_path ${file}
21
       do
22
23
               count=`expr ${count} + 1`
24
               if [ ${count} -gt 10 ]; then
25
                       break
26
               fi
27
28
               tgt=`readlink ${file}`
29
30
               case $tgt in
31
               /*)
32
                       file=$tgt;;
33
               *)
34
                       file=${file%/*}/${tgt}
35
                       file=`absolute_path ${file}`
36
                       ;;
37
               esac
38
       done
39
40
       echo ${file}
33
}
41
}
34
absolute_path() {
42
absolute_path() {

Return to bug 197542