Don't create absolute symbolic links;
make them relative instead. From-SVN: r4815
This commit is contained in:
parent
458e8901e3
commit
884caf18bb
@ -113,9 +113,12 @@ if $LINKS; then
|
|||||||
if expr $x : "${INPUT}/.*" > /dev/null; then
|
if expr $x : "${INPUT}/.*" > /dev/null; then
|
||||||
# Y gets the actual target dir name, relative to ${INPUT}.
|
# Y gets the actual target dir name, relative to ${INPUT}.
|
||||||
y=`echo $x | sed -n "s&${INPUT}/&&p"`
|
y=`echo $x | sed -n "s&${INPUT}/&&p"`
|
||||||
echo $file '->' $y ': Making link'
|
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
|
||||||
|
dots=`echo "$file" |
|
||||||
|
sed -e 's@^./@@' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
|
||||||
|
echo $file '->' $dots$y ': Making link'
|
||||||
rm -fr ${LIB}/$file > /dev/null 2>&1
|
rm -fr ${LIB}/$file > /dev/null 2>&1
|
||||||
ln -s ${LIB}/$y ${LIB}/$file > /dev/null 2>&1
|
ln -s $dots$y ${LIB}/$file > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
# If the link is to outside ${INPUT},
|
# If the link is to outside ${INPUT},
|
||||||
# treat this directory as if it actually contained the files.
|
# treat this directory as if it actually contained the files.
|
||||||
|
@ -161,9 +161,12 @@ if $LINKS; then
|
|||||||
elif expr $x : "${INPUT}/.*" > /dev/null; then
|
elif expr $x : "${INPUT}/.*" > /dev/null; then
|
||||||
# Y gets the actual target dir name, relative to ${INPUT}.
|
# Y gets the actual target dir name, relative to ${INPUT}.
|
||||||
y=`echo $x | sed -n "s&${INPUT}/&&p"`
|
y=`echo $x | sed -n "s&${INPUT}/&&p"`
|
||||||
echo $file '->' $y ': Making link'
|
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
|
||||||
|
dots=`echo "$file" |
|
||||||
|
sed -e 's@^./@@' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
|
||||||
|
echo $file '->' $dots$y ': Making link'
|
||||||
rm -fr ${LIB}/$file > /dev/null 2>&1
|
rm -fr ${LIB}/$file > /dev/null 2>&1
|
||||||
ln -s ${LIB}/$y ${LIB}/$file > /dev/null 2>&1
|
ln -s $dots$y ${LIB}/$file > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
# If the link is to a dir $target outside ${INPUT},
|
# If the link is to a dir $target outside ${INPUT},
|
||||||
# repoint the link at ${INPUT}/root$target
|
# repoint the link at ${INPUT}/root$target
|
||||||
@ -201,8 +204,11 @@ if $LINKS; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
# DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
|
||||||
|
dots=`echo "$file" |
|
||||||
|
sed -e 's@^./@@' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
|
||||||
rm -fr ${LIB}/$file > /dev/null 2>&1
|
rm -fr ${LIB}/$file > /dev/null 2>&1
|
||||||
ln -s ${LIB}/root$x ${LIB}/$file > /dev/null 2>&1
|
ln -s ${dots}root$x ${LIB}/$file > /dev/null 2>&1
|
||||||
treetops="$treetops $x ${LIB}/root$x"
|
treetops="$treetops $x ${LIB}/root$x"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user