xbps-src: another way to get the target of symlinks.

This commit is contained in:
Juan RP 2011-06-14 15:26:15 +02:00
parent d34cb6e0cd
commit 205d066e7c
1 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,8 @@ _EOF
echo "<key>target</key>" >> $TMPFPLIST
lnk=$(readlink -f "$f"|sed -e "s|${DESTDIR}||")
if [ -z "$lnk" -o "$lnk" = "" ]; then
lnk=$(readlink "$f"|sed -e "s|${DESTDIR}||")
rellnk=$(readlink "$f")
lnk=$(readlink -f $(dirname $f)/$rellnk|sed -e "s|${DESTDIR}||")
fi
echo "<string>$lnk</string>" >> $TMPFPLIST
echo "</dict>" >> $TMPFPLIST