]> git.lyx.org Git - lyx.git/commitdiff
correct symlink creation - make them relative instead of absolute
authorStephan Witt <switt@lyx.org>
Fri, 24 Jul 2015 16:41:26 +0000 (18:41 +0200)
committerStephan Witt <switt@lyx.org>
Fri, 24 Jul 2015 16:41:26 +0000 (18:41 +0200)
follow up of f45202acde6a98d9338f162f8ba917b2432580aa

development/LyX-Mac-binary-release.sh

index a7f0620ff217f67606fa8dee9149bd25a4b28892..9f13ce1b3359feea60f02481af2cf83360ec6ac7 100644 (file)
@@ -803,10 +803,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"