From ad79120210891c26dc5f506d7036931ae6d8c4f9 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Fri, 24 Jul 2015 18:41:26 +0200 Subject: [PATCH] correct symlink creation - make them relative instead of absolute follow up of f45202acde6a98d9338f162f8ba917b2432580aa (cherry picked from commit 5a3c9247d8d1de1f5f27b63539d80e8871d56f36) --- development/LyX-Mac-binary-release.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 18d394d662..848c64935b 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -781,10 +781,14 @@ deduplicate() { find "$@" -type f -print | while read file ; do echo $(md5 -q "$file") "$file" done | sort | while read hash file ; do - if [ "$phash" = "$hash" ]; then + ppath=$(dirname "$pfile") + path=$(dirname "$file") + if [ "$phash" = "$hash" -a "$ppath" = "$path" ]; then + pname=$(basename "$pfile") + name=$(basename "$file") cmp -s "$pfile" "$file" && ( rm "$file" - ln -s "$pfile" "$file" && echo link for "$file" created + cd "$path" && ln -s "$pname" "$name" && echo link for "$file" created ) fi phash="$hash"